Skip to contentSkip to conversation

backlight: platform_lcd: Remove #ifdef CONFIG_PM_SLEEP

PATCH In review Alexander Shiyan 2 participants 2 messages Mar 29, 2014 – Mar 31, 2014

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

PATCH 2/2 backlight: platform_lcd: Remove #ifdef CONFIG_PM_SLEEP

This patch removes #ifdef CONFIG_PM_SLEEP to improve compile coverage.

---
 drivers/video/backlight/platform_lcd.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/video/backlight/platform_lcd.c +2 -4
index 4afc21f..986f46a 100644
@@ -110,8 +110,7 @@ static int platform_lcd_probe(struct platform_device *pdev)
 	return 0;
 }
 
-#ifdef CONFIG_PM_SLEEP
-static int platform_lcd_suspend(struct device *dev)
+static int __maybe_unused platform_lcd_suspend(struct device *dev)
 {
 	struct platform_lcd *plcd = dev_get_drvdata(dev);
 
@@ -121,7 +120,7 @@ static int platform_lcd_suspend(struct device *dev)
 	return 0;
 }
 
-static int platform_lcd_resume(struct device *dev)
+static int __maybe_unused platform_lcd_resume(struct device *dev)
 {
 	struct platform_lcd *plcd = dev_get_drvdata(dev);
 
@@ -130,7 +129,6 @@ static int platform_lcd_resume(struct device *dev)
 
 	return 0;
 }
-#endif
 
 static SIMPLE_DEV_PM_OPS(platform_lcd_pm_ops, platform_lcd_suspend,
 			platform_lcd_resume);
Signature · 1 line
1.8.3.2
#1 lore raw
Quoted 1 line

This patch removes #ifdef CONFIG_PM_SLEEP to improve compile coverage.

Compile coverage would improve if we removed all in-file CONFIG stipulations, but that's not helpful. What's the reason for removing them in this case?

Quoted 36 lines
---
 drivers/video/backlight/platform_lcd.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/video/backlight/platform_lcd.c +2 -4
index 4afc21f..986f46a 100644
@@ -110,8 +110,7 @@ static int platform_lcd_probe(struct platform_device *pdev)
 	return 0;
 }
 
-#ifdef CONFIG_PM_SLEEP
-static int platform_lcd_suspend(struct device *dev)
+static int __maybe_unused platform_lcd_suspend(struct device *dev)
 {
 	struct platform_lcd *plcd = dev_get_drvdata(dev);
 
@@ -121,7 +120,7 @@ static int platform_lcd_suspend(struct device *dev)
 	return 0;
 }
 
-static int platform_lcd_resume(struct device *dev)
+static int __maybe_unused platform_lcd_resume(struct device *dev)
 {
 	struct platform_lcd *plcd = dev_get_drvdata(dev);
 
@@ -130,7 +129,6 @@ static int platform_lcd_resume(struct device *dev)
 
 	return 0;
 }
-#endif
 
 static SIMPLE_DEV_PM_OPS(platform_lcd_pm_ops, platform_lcd_suspend,
 			platform_lcd_resume);
Signature · 4 lines
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog