[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e07e7bba-0c2a-c6d2-e060-964ab3592d07@redhat.com>
Date: Thu, 16 Dec 2021 00:26:31 +0100
From: Javier Martinez Canillas <javierm@...hat.com>
To: Thomas Zimmermann <tzimmermann@...e.de>,
linux-kernel@...r.kernel.org, dri-devel@...ts.freedesktop.org
Cc: Emma Anholt <emma@...olt.net>,
Neil Armstrong <narmstrong@...libre.com>,
Xinliang Liu <xinliang.liu@...aro.org>,
Edmund Dea <edmund.j.dea@...el.com>,
Paul Cercueil <paul@...pouillou.net>,
Tomi Valkeinen <tomba@...nel.org>,
Thierry Reding <thierry.reding@...il.com>,
Laurent Pinchart <laurent.pinchart@...asonboard.com>,
Benjamin Gaignard <benjamin.gaignard@...aro.org>,
Anitha Chrisanthus <anitha.chrisanthus@...el.com>,
Sam Ravnborg <sam@...nborg.org>, Marek Vasut <marex@...x.de>,
Joonyoung Shim <jy0922.shim@...sung.com>,
Oleksandr Andrushchenko <oleksandr_andrushchenko@...m.com>,
Alexey Brodkin <abrodkin@...opsys.com>,
Russell King <linux@...linux.org.uk>,
Deepak Rawat <drawat.floss@...il.com>,
Chen-Yu Tsai <wens@...e.org>,
Kieran Bingham <kieran.bingham+renesas@...asonboard.com>,
"James (Qian) Wang" <james.qian.wang@....com>,
Joel Stanley <joel@....id.au>,
Russell King <linux+etnaviv@...linux.org.uk>,
Qiang Yu <yuq825@...il.com>,
Chun-Kuang Hu <chunkuang.hu@...nel.org>,
David Lechner <david@...hnology.com>,
Liviu Dudau <liviu.dudau@....com>,
Alison Wang <alison.wang@....com>,
Hans de Goede <hdegoede@...hat.com>,
Laurentiu Palcu <laurentiu.palcu@....nxp.com>,
Kamlesh Gurudasani <kamlesh.gurudasani@...il.com>,
Sean Paul <sean@...rly.run>,
Tomeu Vizoso <tomeu.vizoso@...labora.com>,
Hyun Kwon <hyun.kwon@...inx.com>,
Boris Brezillon <bbrezillon@...nel.org>,
Yannick Fertre <yannick.fertre@...s.st.com>,
Sandy Huang <hjc@...k-chips.com>,
Noralf Trønnes <noralf@...nnes.org>,
Philippe Cornu <philippe.cornu@...s.st.com>,
Tian Tao <tiantao6@...ilicon.com>,
Jyri Sarha <jyri.sarha@....fi>,
Erico Nunes <nunes.erico@...il.com>
Subject: Re: [PATCH 00/60] drm: Make all drivers to honour the nomodeset
parameter
On 12/15/21 10:10, Thomas Zimmermann wrote:
[snip]
>
> An extra pointer sounds indeed like over-engineering. If we take ast for
> example, I'd just do something like this:
>
> static ast_pci_register_driver(struct pci_driver *pci)
> {
> if (drm_firmware_drivers_only() && ast_modeset == -1)
> return -ENODEV;
> if (ast_modeset == 0)
> return -ENODEV;
>
> return pci_register_driver(pci);
> }
>
> module_driver(&ast_pci_driver, ast_pci_register_driver,
> pci_unregister_driver)
>
> That removes some of the boiler-plate module code without changing the
> driver's behavior.
>
Agreed that would be a nice cleanup and could allow to for example get rid
of the following module exit function that's just a wrapper:
static void __exit ast_exit(void)
{
pci_unregister_driver(&ast_pci_driver);
}
But I think these cleanups are out of scope for this series and could be
done as a follow-up. Since the drm_firmware_drivers_only() check would
be needed in the module init function anyways.
> Best regards
> Thomas
>
Best regards,
--
Javier Martinez Canillas
Linux Engineering
Red Hat
Powered by blists - more mailing lists