public inbox for linux-fbdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: fbtft: fix dev_info() device arguments
@ 2026-02-02  9:57 Arnd Bergmann
  2026-02-02 11:32 ` Thomas Zimmermann
  0 siblings, 1 reply; 5+ messages in thread
From: Arnd Bergmann @ 2026-02-02  9:57 UTC (permalink / raw)
  To: Andy Shevchenko, Greg Kroah-Hartman, Thomas Petazzoni,
	Noralf Tronnes, Helge Deller, Thomas Zimmermann, Chintan Patel
  Cc: Arnd Bergmann, Abdun Nihaal, Dan Carpenter,
	Matthew Wilcox (Oracle), Jianglei Nie, dri-devel, linux-fbdev,
	linux-staging, linux-kernel

From: Arnd Bergmann <arnd@arndb.de>

When CONFIG_FB_DEVICE is disabled, the fbtft driver fails to
build with:

In file included from include/linux/device.h:15,
                 from drivers/staging/fbtft/fbtft-core.c:18:
drivers/staging/fbtft/fbtft-core.c: In function 'fbtft_fb_setcolreg':
drivers/staging/fbtft/fbtft-core.c:368:21: error: 'struct fb_info' has no member named 'dev'
  368 |         dev_dbg(info->dev,
drivers/staging/fbtft/fbtft-core.c:394:21: error: 'struct fb_info' has no member named 'dev'
  394 |         dev_dbg(info->dev, "%s(blank=%d)\n",
drivers/staging/fbtft/fbtft-core.c:796:25: error: 'struct fb_info' has no member named 'dev'
  796 |         dev_info(fb_info->dev,
drivers/staging/fbtft/fbtft-core.c:796:9: note: in expansion of macro 'dev_info'
  796 |         dev_info(fb_info->dev,

Use fb_info->device instead of fb_info->dev here, which appears
to be what was intended in the first place.

Fixes: c296d5f9957c ("staging: fbtft: core support")
Fixes: bc9f9cb85a7d ("staging: fbtft: Make FB_DEVICE dependency optional")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/staging/fbtft/fbtft-core.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/fbtft/fbtft-core.c b/drivers/staging/fbtft/fbtft-core.c
index 15affe6f1537..41326b1df733 100644
--- a/drivers/staging/fbtft/fbtft-core.c
+++ b/drivers/staging/fbtft/fbtft-core.c
@@ -365,7 +365,7 @@ static int fbtft_fb_setcolreg(unsigned int regno, unsigned int red,
 	unsigned int val;
 	int ret = 1;
 
-	dev_dbg(info->dev,
+	dev_dbg(info->device,
 		"%s(regno=%u, red=0x%X, green=0x%X, blue=0x%X, trans=0x%X)\n",
 		__func__, regno, red, green, blue, transp);
 
@@ -391,7 +391,7 @@ static int fbtft_fb_blank(int blank, struct fb_info *info)
 	struct fbtft_par *par = info->par;
 	int ret = -EINVAL;
 
-	dev_dbg(info->dev, "%s(blank=%d)\n",
+	dev_dbg(info->device, "%s(blank=%d)\n",
 		__func__, blank);
 
 	if (!par->fbtftops.blank)
@@ -793,7 +793,7 @@ int fbtft_register_framebuffer(struct fb_info *fb_info)
 	if (spi)
 		sprintf(text2, ", spi%d.%d at %d MHz", spi->controller->bus_num,
 			spi_get_chipselect(spi, 0), spi->max_speed_hz / 1000000);
-	dev_info(fb_info->dev,
+	dev_info(fb_info->device,
 		 "%s frame buffer, %dx%d, %d KiB video memory%s, fps=%lu%s\n",
 		 fb_info->fix.id, fb_info->var.xres, fb_info->var.yres,
 		 fb_info->fix.smem_len >> 10, text1,
-- 
2.39.5


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] staging: fbtft: fix dev_info() device arguments
  2026-02-02  9:57 [PATCH] staging: fbtft: fix dev_info() device arguments Arnd Bergmann
@ 2026-02-02 11:32 ` Thomas Zimmermann
  2026-02-02 12:12   ` Arnd Bergmann
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas Zimmermann @ 2026-02-02 11:32 UTC (permalink / raw)
  To: Arnd Bergmann, Andy Shevchenko, Greg Kroah-Hartman,
	Thomas Petazzoni, Noralf Tronnes, Helge Deller, Chintan Patel
  Cc: Arnd Bergmann, Abdun Nihaal, Dan Carpenter,
	Matthew Wilcox (Oracle), Jianglei Nie, dri-devel, linux-fbdev,
	linux-staging, linux-kernel

Hi,

there's already

https://patchwork.freedesktop.org/series/160468/

which no one picked up yet. This needs to go into the fbdev tree, but I 
can also take into drm-misc-fixes.


Am 02.02.26 um 10:57 schrieb Arnd Bergmann:
> From: Arnd Bergmann <arnd@arndb.de>
>
> When CONFIG_FB_DEVICE is disabled, the fbtft driver fails to
> build with:
>
> In file included from include/linux/device.h:15,
>                   from drivers/staging/fbtft/fbtft-core.c:18:
> drivers/staging/fbtft/fbtft-core.c: In function 'fbtft_fb_setcolreg':
> drivers/staging/fbtft/fbtft-core.c:368:21: error: 'struct fb_info' has no member named 'dev'
>    368 |         dev_dbg(info->dev,
> drivers/staging/fbtft/fbtft-core.c:394:21: error: 'struct fb_info' has no member named 'dev'
>    394 |         dev_dbg(info->dev, "%s(blank=%d)\n",
> drivers/staging/fbtft/fbtft-core.c:796:25: error: 'struct fb_info' has no member named 'dev'
>    796 |         dev_info(fb_info->dev,
> drivers/staging/fbtft/fbtft-core.c:796:9: note: in expansion of macro 'dev_info'
>    796 |         dev_info(fb_info->dev,
>
> Use fb_info->device instead of fb_info->dev here, which appears
> to be what was intended in the first place.
>
> Fixes: c296d5f9957c ("staging: fbtft: core support")
> Fixes: bc9f9cb85a7d ("staging: fbtft: Make FB_DEVICE dependency optional")

These commit hashes differ from the other fix?

Best regards
Thomas


> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>   drivers/staging/fbtft/fbtft-core.c | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/staging/fbtft/fbtft-core.c b/drivers/staging/fbtft/fbtft-core.c
> index 15affe6f1537..41326b1df733 100644
> --- a/drivers/staging/fbtft/fbtft-core.c
> +++ b/drivers/staging/fbtft/fbtft-core.c
> @@ -365,7 +365,7 @@ static int fbtft_fb_setcolreg(unsigned int regno, unsigned int red,
>   	unsigned int val;
>   	int ret = 1;
>   
> -	dev_dbg(info->dev,
> +	dev_dbg(info->device,
>   		"%s(regno=%u, red=0x%X, green=0x%X, blue=0x%X, trans=0x%X)\n",
>   		__func__, regno, red, green, blue, transp);
>   
> @@ -391,7 +391,7 @@ static int fbtft_fb_blank(int blank, struct fb_info *info)
>   	struct fbtft_par *par = info->par;
>   	int ret = -EINVAL;
>   
> -	dev_dbg(info->dev, "%s(blank=%d)\n",
> +	dev_dbg(info->device, "%s(blank=%d)\n",
>   		__func__, blank);
>   
>   	if (!par->fbtftops.blank)
> @@ -793,7 +793,7 @@ int fbtft_register_framebuffer(struct fb_info *fb_info)
>   	if (spi)
>   		sprintf(text2, ", spi%d.%d at %d MHz", spi->controller->bus_num,
>   			spi_get_chipselect(spi, 0), spi->max_speed_hz / 1000000);
> -	dev_info(fb_info->dev,
> +	dev_info(fb_info->device,
>   		 "%s frame buffer, %dx%d, %d KiB video memory%s, fps=%lu%s\n",
>   		 fb_info->fix.id, fb_info->var.xres, fb_info->var.yres,
>   		 fb_info->fix.smem_len >> 10, text1,

-- 
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstr. 146, 90461 Nürnberg, Germany, www.suse.com
GF: Jochen Jaser, Andrew McDonald, Werner Knoblich, (HRB 36809, AG Nürnberg)



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] staging: fbtft: fix dev_info() device arguments
  2026-02-02 11:32 ` Thomas Zimmermann
@ 2026-02-02 12:12   ` Arnd Bergmann
  2026-02-02 13:11     ` Helge Deller
  0 siblings, 1 reply; 5+ messages in thread
From: Arnd Bergmann @ 2026-02-02 12:12 UTC (permalink / raw)
  To: Thomas Zimmermann, Arnd Bergmann, Andy Shevchenko,
	Greg Kroah-Hartman, Thomas Petazzoni, Noralf Tronnes,
	Helge Deller, Chintan Patel
  Cc: Abdun Nihaal, Dan Carpenter, Matthew Wilcox, Jianglei Nie,
	dri-devel, linux-fbdev, linux-staging, linux-kernel

On Mon, Feb 2, 2026, at 12:32, Thomas Zimmermann wrote:
> Hi,
>
> there's already
>
> https://patchwork.freedesktop.org/series/160468/
>
> which no one picked up yet. This needs to go into the fbdev tree, but I 
> can also take into drm-misc-fixes.

Ok, that looks fine as well. The output is of course
different, but I don't think that matters either way.

> Am 02.02.26 um 10:57 schrieb Arnd Bergmann:
>> From: Arnd Bergmann <arnd@arndb.de>

>>
>> Fixes: c296d5f9957c ("staging: fbtft: core support")
>> Fixes: bc9f9cb85a7d ("staging: fbtft: Make FB_DEVICE dependency optional")
>
> These commit hashes differ from the other fix?

No idea. The bc9f9cb85a7d commit is currently in linux-next,
the a06d03f9f238 is not.

     Arnd

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] staging: fbtft: fix dev_info() device arguments
  2026-02-02 12:12   ` Arnd Bergmann
@ 2026-02-02 13:11     ` Helge Deller
  2026-02-02 13:29       ` Thomas Zimmermann
  0 siblings, 1 reply; 5+ messages in thread
From: Helge Deller @ 2026-02-02 13:11 UTC (permalink / raw)
  To: Arnd Bergmann, Thomas Zimmermann, Andy Shevchenko,
	Greg Kroah-Hartman, Thomas Petazzoni, Noralf Tronnes,
	Chintan Patel
  Cc: Abdun Nihaal, Dan Carpenter, Matthew Wilcox, Jianglei Nie,
	dri-devel, linux-fbdev, linux-staging, linux-kernel

On 2/2/26 13:12, Arnd Bergmann wrote:
> On Mon, Feb 2, 2026, at 12:32, Thomas Zimmermann wrote:
>> Hi,
>>
>> there's already
>>
>> https://patchwork.freedesktop.org/series/160468/
>>
>> which no one picked up yet. This needs to go into the fbdev tree, but I
>> can also take into drm-misc-fixes.
> 
> Ok, that looks fine as well. The output is of course
> different, but I don't think that matters either way.

I picked it up into fbdev now.
There might have been some conflicts with staging tree, which I haven't
done so earlier. Let's see...

Helge

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] staging: fbtft: fix dev_info() device arguments
  2026-02-02 13:11     ` Helge Deller
@ 2026-02-02 13:29       ` Thomas Zimmermann
  0 siblings, 0 replies; 5+ messages in thread
From: Thomas Zimmermann @ 2026-02-02 13:29 UTC (permalink / raw)
  To: Helge Deller, Arnd Bergmann, Andy Shevchenko, Greg Kroah-Hartman,
	Thomas Petazzoni, Noralf Tronnes, Chintan Patel
  Cc: Abdun Nihaal, Dan Carpenter, Matthew Wilcox, Jianglei Nie,
	dri-devel, linux-fbdev, linux-staging, linux-kernel

Hi

Am 02.02.26 um 14:11 schrieb Helge Deller:
> On 2/2/26 13:12, Arnd Bergmann wrote:
>> On Mon, Feb 2, 2026, at 12:32, Thomas Zimmermann wrote:
>>> Hi,
>>>
>>> there's already
>>>
>>> https://patchwork.freedesktop.org/series/160468/
>>>
>>> which no one picked up yet. This needs to go into the fbdev tree, but I
>>> can also take into drm-misc-fixes.
>>
>> Ok, that looks fine as well. The output is of course
>> different, but I don't think that matters either way.
>
> I picked it up into fbdev now.

Thanks a lot!

Best regards
Thomas

> There might have been some conflicts with staging tree, which I haven't
> done so earlier. Let's see...
>
> Helge

-- 
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstr. 146, 90461 Nürnberg, Germany, www.suse.com
GF: Jochen Jaser, Andrew McDonald, Werner Knoblich, (HRB 36809, AG Nürnberg)



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-02-02 13:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-02  9:57 [PATCH] staging: fbtft: fix dev_info() device arguments Arnd Bergmann
2026-02-02 11:32 ` Thomas Zimmermann
2026-02-02 12:12   ` Arnd Bergmann
2026-02-02 13:11     ` Helge Deller
2026-02-02 13:29       ` Thomas Zimmermann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox