* [PATCH] staging: fbtft: ili9341: use macro FBTFT_REGISTER_SPI_DRIVER
@ 2023-07-02 8:03 Raphael Gallais-Pou
2023-07-02 12:02 ` Greg Kroah-Hartman
0 siblings, 1 reply; 4+ messages in thread
From: Raphael Gallais-Pou @ 2023-07-02 8:03 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: dri-devel, linux-fbdev, linux-staging, linux-kernel
Using FBTFT_REGISTER_DRIVER resolves to a NULL struct spi_device_id. This
ultimately causes the module to an early exit at probe time.
In addition the MODULE_ALIASes can be dropped.
Signed-off-by: Raphael Gallais-Pou <rgallaispou@gmail.com>
---
drivers/staging/fbtft/fb_ili9341.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/staging/fbtft/fb_ili9341.c b/drivers/staging/fbtft/fb_ili9341.c
index 9ccd0823c3ab..9528bf3cf711 100644
--- a/drivers/staging/fbtft/fb_ili9341.c
+++ b/drivers/staging/fbtft/fb_ili9341.c
@@ -145,12 +145,7 @@ static struct fbtft_display display = {
},
};
-FBTFT_REGISTER_DRIVER(DRVNAME, "ilitek,ili9341", &display);
-
-MODULE_ALIAS("spi:" DRVNAME);
-MODULE_ALIAS("platform:" DRVNAME);
-MODULE_ALIAS("spi:ili9341");
-MODULE_ALIAS("platform:ili9341");
+FBTFT_REGISTER_SPI_DRIVER(DRVNAME, "ilitek", "ili9341", &display);
MODULE_DESCRIPTION("FB driver for the ILI9341 LCD display controller");
MODULE_AUTHOR("Christian Vogelgsang");
--
2.41.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] staging: fbtft: ili9341: use macro FBTFT_REGISTER_SPI_DRIVER
2023-07-02 8:03 [PATCH] staging: fbtft: ili9341: use macro FBTFT_REGISTER_SPI_DRIVER Raphael Gallais-Pou
@ 2023-07-02 12:02 ` Greg Kroah-Hartman
2023-07-02 13:05 ` Raphaël Gallais-Pou
0 siblings, 1 reply; 4+ messages in thread
From: Greg Kroah-Hartman @ 2023-07-02 12:02 UTC (permalink / raw)
To: Raphael Gallais-Pou; +Cc: dri-devel, linux-fbdev, linux-staging, linux-kernel
On Sun, Jul 02, 2023 at 10:03:24AM +0200, Raphael Gallais-Pou wrote:
> Using FBTFT_REGISTER_DRIVER resolves to a NULL struct spi_device_id. This
> ultimately causes the module to an early exit at probe time.
So this doesn't work at all today? Has it ever worked? What commit
does thi fix?
> In addition the MODULE_ALIASes can be dropped.
Why? When you say "also" or "in addition", that's a huge hint it should
be a separate patch.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] staging: fbtft: ili9341: use macro FBTFT_REGISTER_SPI_DRIVER
2023-07-02 12:02 ` Greg Kroah-Hartman
@ 2023-07-02 13:05 ` Raphaël Gallais-Pou
2023-07-03 13:25 ` Greg Kroah-Hartman
0 siblings, 1 reply; 4+ messages in thread
From: Raphaël Gallais-Pou @ 2023-07-02 13:05 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: dri-devel, linux-fbdev, linux-staging, linux-kernel
Hi,
Le 02/07/2023 à 14:02, Greg Kroah-Hartman a écrit :
> On Sun, Jul 02, 2023 at 10:03:24AM +0200, Raphael Gallais-Pou wrote:
>> Using FBTFT_REGISTER_DRIVER resolves to a NULL struct spi_device_id. This
>> ultimately causes the module to an early exit at probe time.
>
> So this doesn't work at all today? Has it ever worked? What commit
> does thi fix?
I tested again with only a tweak in my device-tree. The early exit in
the driver's code is caused by a missing field. So regarding this
particular driver the macro works.
It resolves to set spi_driver.id_table = NULL, which yields a warning in
__spi_register_driver(). So I guess this patch only fixes a warning.
>
>> In addition the MODULE_ALIASes can be dropped.
>
> Why? When you say "also" or "in addition", that's a huge hint it should
> be a separate patch.
I did not find any reference to those aliases in the kernel, which led
me to remove those.
If you think they are still necessary, I'll split them in an upcoming v2.
Thanks for your insights,
Raphaël
>
> thanks,
>
> greg k-h
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] staging: fbtft: ili9341: use macro FBTFT_REGISTER_SPI_DRIVER
2023-07-02 13:05 ` Raphaël Gallais-Pou
@ 2023-07-03 13:25 ` Greg Kroah-Hartman
0 siblings, 0 replies; 4+ messages in thread
From: Greg Kroah-Hartman @ 2023-07-03 13:25 UTC (permalink / raw)
To: Raphaël Gallais-Pou
Cc: dri-devel, linux-fbdev, linux-staging, linux-kernel
On Sun, Jul 02, 2023 at 03:05:25PM +0200, Raphaël Gallais-Pou wrote:
> Hi,
>
> Le 02/07/2023 à 14:02, Greg Kroah-Hartman a écrit :
> > On Sun, Jul 02, 2023 at 10:03:24AM +0200, Raphael Gallais-Pou wrote:
> > > Using FBTFT_REGISTER_DRIVER resolves to a NULL struct spi_device_id. This
> > > ultimately causes the module to an early exit at probe time.
> >
> > So this doesn't work at all today? Has it ever worked? What commit
> > does thi fix?
>
> I tested again with only a tweak in my device-tree. The early exit in the
> driver's code is caused by a missing field. So regarding this particular
> driver the macro works.
>
> It resolves to set spi_driver.id_table = NULL, which yields a warning in
> __spi_register_driver(). So I guess this patch only fixes a warning.
Ok, please fix the changelog text when you resend this.
> > > In addition the MODULE_ALIASes can be dropped.
> >
> > Why? When you say "also" or "in addition", that's a huge hint it should
> > be a separate patch.
> I did not find any reference to those aliases in the kernel, which led me to
> remove those.
Aliases are used by userspace, not the kernel.
> If you think they are still necessary, I'll split them in an upcoming v2.
Please document why they are not needed in order to be able to be
removed.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-07-03 13:26 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-02 8:03 [PATCH] staging: fbtft: ili9341: use macro FBTFT_REGISTER_SPI_DRIVER Raphael Gallais-Pou
2023-07-02 12:02 ` Greg Kroah-Hartman
2023-07-02 13:05 ` Raphaël Gallais-Pou
2023-07-03 13:25 ` Greg Kroah-Hartman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).