# \[PATCH 2/2\] backlight: platform\_lcd: Remove \#ifdef CONFIG\_PM\_SLEEP

- Subsystems: FRAMEBUFFER LAYER, BACKLIGHT CLASS/SUBSYSTEM, THE REST
- Maintainers: Helge Deller, Lee Jones, Daniel Thompson, Jingoo Han, Linus Torvalds
- List: linux-fbdev
- 2 messages, 2 authors
- Page: https://ratatoskr.run/linux-fbdev/2014/03/13465679/t

## \[PATCH 2/2\] backlight: platform\_lcd: Remove \#ifdef CONFIG\_PM\_SLEEP

- From: Alexander Shiyan \<hidden\>
- Date: 2014-03-29 10:00:20 
- Message: https://ratatoskr.run/linux-fbdev/2014/03/13465679.md

```text
This patch removes #ifdef CONFIG_PM_SLEEP to improve compile coverage.

Signed-off-by: Alexander Shiyan <redacted>
---
 drivers/video/backlight/platform_lcd.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/video/backlight/platform_lcd.c b/drivers/video/backlight/platform_lcd.c
index 4afc21f..986f46a 100644
--- a/drivers/video/backlight/platform_lcd.c
+++ b/drivers/video/backlight/platform_lcd.c
@@ -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);
-- 
1.8.3.2

```

## Re: \[PATCH 2/2\] backlight: platform\_lcd: Remove \#ifdef CONFIG\_PM\_SLEEP

- From: Lee Jones \<hidden\>
- Date: 2014-03-31 07:43:40 
- Message: https://ratatoskr.run/linux-fbdev/2014/03/13465680.md

```text
> 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?

> Signed-off-by: Alexander Shiyan <redacted>
> ---
>  drivers/video/backlight/platform_lcd.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/video/backlight/platform_lcd.c b/drivers/video/backlight/platform_lcd.c
> index 4afc21f..986f46a 100644
> --- a/drivers/video/backlight/platform_lcd.c
> +++ b/drivers/video/backlight/platform_lcd.c
> @@ -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);

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org â”‚ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
```
