Skip to contentSkip to conversation

backlight: corgi_lcd: fix missing prototype

PATCH In review Arnd Bergmann 2 participants 2 messages Apr 17, 2023 – May 3, 2023

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 backlight: corgi_lcd: fix missing prototype

From: Arnd Bergmann <[email protected]>

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.

---
 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(-)
arch/arm/mach-pxa/sharpsl_pm.h +0 -1
index 9429900db0bb..eff9a74e787f 100644
@@ -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
arch/arm/mach-pxa/spitz_pm.c +1 -0
index c783696e13b9..9571f2b5b118 100644
@@ -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>
include/linux/spi/corgi_lcd.h +2 -0
index 0b857616919c..fc6c1515dc54 100644
@@ -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 */
Signature · 1 line
2.39.2
Reviewed-by on v1 1/1
#1 lore raw
Quoted 5 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

The corgi_lcd_limit_intensity() function is called from platform and defined in a driver, but the driver does not see the declaration:

Quoted 7 lines

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.

Daniel.