Re: [PATCH] backlight: pwm_bl: Use SIMPLE_DEV_PM_OPS()
From: Lee Jones <hidden>
Date: 2014-03-31 08:50:47
quoted
quoted
quoted
quoted
Use the SIMPLE_DEV_PM_OPS() macro to declare the driver's pm_ops. Signed-off-by: Alexander Shiyan <redacted> --- drivers/video/backlight/pwm_bl.c | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-)diff --git a/drivers/video/backlight/pwm_bl.c b/drivers/video/backlight/pwm_bl.c index b75201f..d5e1f5b 100644 --- a/drivers/video/backlight/pwm_bl.c +++ b/drivers/video/backlight/pwm_bl.c[...]quoted
-static int pwm_backlight_resume(struct device *dev) +static int __maybe_unused pwm_bl_resume(struct device *dev)What's the __maybe_unused attribute for? In include/linux/compiler-gcc.h it redefines the attribute as 'unused': #define __maybe_unused __attribute__((unused)) ... are you sure this is what you want?Yes. This avoids compiler warnings if CONFIG_PM is unset.What are the advantages of this over the config option? Besides 2 lines of code?Just an increase compile coverage.
What does this mean? I replied to another one of your patches with the same question. -- Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog