]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
pwm_backlight: remove unnecessary ifdefs
authorJingoo Han <jg1.han@samsung.com>
Mon, 25 Feb 2013 08:15:47 +0000 (17:15 +0900)
committerThierry Reding <thierry.reding@avionic-design.de>
Tue, 26 Feb 2013 07:29:57 +0000 (08:29 +0100)
When the macro such as SIMPLE_DEV_PM_OPS is used, there is
no need to use '#ifdef CONFIG_PM' to prevent build error. Thus,
this patch removes unnecessary ifdefs.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Cc: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
drivers/video/backlight/pwm_bl.c

index a71ef4a79ec452c95707f97cb408830e47342d2a..93666a79881dfb786d08b34cc0be64db140d03e7 100644 (file)
@@ -274,7 +274,7 @@ static int pwm_backlight_remove(struct platform_device *pdev)
        return 0;
 }
 
-#ifdef CONFIG_PM
+#ifdef CONFIG_PM_SLEEP
 static int pwm_backlight_suspend(struct device *dev)
 {
        struct backlight_device *bl = dev_get_drvdata(dev);
@@ -296,19 +296,16 @@ static int pwm_backlight_resume(struct device *dev)
        backlight_update_status(bl);
        return 0;
 }
+#endif
 
 static SIMPLE_DEV_PM_OPS(pwm_backlight_pm_ops, pwm_backlight_suspend,
                         pwm_backlight_resume);
 
-#endif
-
 static struct platform_driver pwm_backlight_driver = {
        .driver         = {
                .name           = "pwm-backlight",
                .owner          = THIS_MODULE,
-#ifdef CONFIG_PM
                .pm             = &pwm_backlight_pm_ops,
-#endif
                .of_match_table = of_match_ptr(pwm_backlight_of_match),
        },
        .probe          = pwm_backlight_probe,