backlight: platform_lcd: remove unnecessary #ifdef CONFIG_OF
Subsystems (2)
PATCH 1/1 backlight: platform_lcd: remove unnecessary #ifdef CONFIG_OF
Remove unnecessary #ifdef CONFIG_OF, because this is already handled by the of_match_ptr macro.
--- drivers/video/backlight/platform_lcd.c | 2 -- 1 file changed, 2 deletions(-)
drivers/video/backlight/platform_lcd.c +0 -2
@@ -137,13 +137,11 @@ static int platform_lcd_resume(struct device *dev) static SIMPLE_DEV_PM_OPS(platform_lcd_pm_ops, platform_lcd_suspend, platform_lcd_resume); -#ifdef CONFIG_OF static const struct of_device_id platform_lcd_of_match[] = { { .compatible ="platform-lcd" }, {}, };MODULE_DEVICE_TABLE (of, platform_lcd_of_match); -#endif static struct platform_driver platform_lcd_driver = { .driver = {
Signature · 1 line
2.0.0
Quoted 16 lines · Jingoo Han
Remove unnecessary #ifdef
CONFIG_OF, because this is already handled by theof_match_ptrmacro.Signed-off-by Jingoo Han <[email protected]>--- drivers/video/backlight/platform_lcd.c | 2 -- 1 file changed, 2 deletions(-)drivers/video/backlight/platform_lcd.c +0
-0@@ -137,13 +137,11 @@ static int platform_lcd_resume(struct device *dev) static SIMPLE_DEV_PM_OPS(platform_lcd_pm_ops, platform_lcd_suspend, platform_lcd_resume);
drivers/video/backlight/platform_lcd.c static int platform_lcd_resume(struct device *dev) · line 147
Quoted 10 lines
drivers/video/backlight/platform_lcd.c +0
-2-#ifdef CONFIG_OF static const struct of_device_id platform_lcd_of_match[] = { { .compatible ="platform-lcd" }, {}, };MODULE_DEVICE_TABLE (of, platform_lcd_of_match); -#endif static struct platform_driver platform_lcd_driver = { .driver = {
Doesn't this introduce a compiler warning ("defined but not used") if CONFIG_OF is not set?
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Quoted 25 lines · Jingoo Han
Quoted 24 lines · Jingoo Han
Remove unnecessary #ifdef
CONFIG_OF, because this is already handled by theof_match_ptrmacro.Signed-off-by Jingoo Han <[email protected]>--- drivers/video/backlight/platform_lcd.c | 2 -- 1 file changed, 2 deletions(-)drivers/video/backlight/platform_lcd.c +0
-2@@ -137,13 +137,11 @@ static int platform_lcd_resume(struct device *dev) static SIMPLE_DEV_PM_OPS(platform_lcd_pm_ops, platform_lcd_suspend, platform_lcd_resume); -#ifdef CONFIG_OF static const struct of_device_id platform_lcd_of_match[] = { { .compatible ="platform-lcd" }, {}, };MODULE_DEVICE_TABLE (of, platform_lcd_of_match); -#endif
Quoted 5 lines
drivers/video/backlight/platform_lcd.c static int platform_lcd_resume(struct device *dev) · line 147
Quoted 2 lines
drivers/video/backlight/platform_lcd.c +0
-0static struct platform_driver platform_lcd_driver = { .driver = {Doesn't this introduce a compiler warning ("defined but not used") if
CONFIG_OFis not set?
Hi Geert Uytterhoeven,
Thank you for your feedback. I already tested this patch with both cases such as CONFIG_OF=y and CONFIG_OF=n. When CONFIG_OF is not set, it does NOT make any compile warnings such as "defined but not used". Thank you.
Best regards,
Jingoo Han