* [PATCH] backlight: corgi_lcd: fix missing prototype
@ 2023-04-17 21:02 Arnd Bergmann
2023-05-03 11:20 ` Daniel Thompson
0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2023-04-17 21:02 UTC (permalink / raw)
To: Lee Jones
Cc: Daniel Thompson, Jingoo Han, dri-devel, linux-kernel,
Arnd Bergmann
From: Arnd Bergmann <arnd@arndb.de>
The corgi_lcd_limit_intensity() function is called from platform
and defined in a driver, but the driver does not see the declaration:
drivers/video/backlight/corgi_lcd.c:434:6: error: no previous prototype for 'corgi_lcd_limit_intensity' [-Werror=missing-prototypes]
434 | void corgi_lcd_limit_intensity(int limit)
Move the prototype into a header that can be included from both
sides to shut up the warning.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
arch/arm/mach-pxa/sharpsl_pm.h | 1 -
arch/arm/mach-pxa/spitz_pm.c | 1 +
include/linux/spi/corgi_lcd.h | 2 ++
3 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/arch/arm/mach-pxa/sharpsl_pm.h b/arch/arm/mach-pxa/sharpsl_pm.h
index 9429900db0bb..eff9a74e787f 100644
--- a/arch/arm/mach-pxa/sharpsl_pm.h
+++ b/arch/arm/mach-pxa/sharpsl_pm.h
@@ -105,5 +105,4 @@ void sharpsl_pm_led(int val);
#define MAX1111_ACIN_VOLT 6u
int sharpsl_pm_pxa_read_max1111(int channel);
-void corgi_lcd_limit_intensity(int limit);
#endif
diff --git a/arch/arm/mach-pxa/spitz_pm.c b/arch/arm/mach-pxa/spitz_pm.c
index c783696e13b9..9571f2b5b118 100644
--- a/arch/arm/mach-pxa/spitz_pm.c
+++ b/arch/arm/mach-pxa/spitz_pm.c
@@ -15,6 +15,7 @@
#include <linux/interrupt.h>
#include <linux/platform_device.h>
#include <linux/apm-emulation.h>
+#include <linux/spi/corgi_lcd.h>
#include <asm/irq.h>
#include <asm/mach-types.h>
diff --git a/include/linux/spi/corgi_lcd.h b/include/linux/spi/corgi_lcd.h
index 0b857616919c..fc6c1515dc54 100644
--- a/include/linux/spi/corgi_lcd.h
+++ b/include/linux/spi/corgi_lcd.h
@@ -15,4 +15,6 @@ struct corgi_lcd_platform_data {
void (*kick_battery)(void);
};
+void corgi_lcd_limit_intensity(int limit);
+
#endif /* __LINUX_SPI_CORGI_LCD_H */
--
2.39.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] backlight: corgi_lcd: fix missing prototype
2023-04-17 21:02 [PATCH] backlight: corgi_lcd: fix missing prototype Arnd Bergmann
@ 2023-05-03 11:20 ` Daniel Thompson
0 siblings, 0 replies; 2+ messages in thread
From: Daniel Thompson @ 2023-05-03 11:20 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Lee Jones, Jingoo Han, dri-devel, linux-kernel, Arnd Bergmann
On Mon, Apr 17, 2023 at 11:02:13PM +0200, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> The corgi_lcd_limit_intensity() function is called from platform
> and defined in a driver, but the driver does not see the declaration:
>
> drivers/video/backlight/corgi_lcd.c:434:6: error: no previous prototype for 'corgi_lcd_limit_intensity' [-Werror=missing-prototypes]
> 434 | void corgi_lcd_limit_intensity(int limit)
>
> Move the prototype into a header that can be included from both
> sides to shut up the warning.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Daniel.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-05-03 11:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-17 21:02 [PATCH] backlight: corgi_lcd: fix missing prototype Arnd Bergmann
2023-05-03 11:20 ` Daniel Thompson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox