aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
authorMarc Zyngier <maz@misterjones.org>2009-06-19 04:50:54 -0400
committerEric Miao <eric.y.miao@gmail.com>2009-07-03 02:22:41 -0400
commit82e8b54229fb121946151b82e8ff3c3284bd723f (patch)
tree1130484cef22b3538beb0bbde5fc781966bebf91 /drivers/video
parent4aa78264d14bb0e87897acb90941c368248e20ce (diff)
backlight: fix pwm_bl.c to notify platform code when suspending
When suspending, pwm-bl sets duty cycle to 0, and shuts down the pwm device. This patch ensure that the platform code is called before that (through the notify callback_, leaving a chance for the platform code to configure GPIOs (shutting off the backlight, for example), much like it is done during normal operations. Signed-off-by: Marc Zyngier <maz@misterjones.org> Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/backlight/pwm_bl.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/video/backlight/pwm_bl.c b/drivers/video/backlight/pwm_bl.c
index e641584e212e..887166267443 100644
--- a/drivers/video/backlight/pwm_bl.c
+++ b/drivers/video/backlight/pwm_bl.c
@@ -145,6 +145,8 @@ static int pwm_backlight_suspend(struct platform_device *pdev,
145 struct backlight_device *bl = platform_get_drvdata(pdev); 145 struct backlight_device *bl = platform_get_drvdata(pdev);
146 struct pwm_bl_data *pb = dev_get_drvdata(&bl->dev); 146 struct pwm_bl_data *pb = dev_get_drvdata(&bl->dev);
147 147
148 if (pb->notify)
149 pb->notify(0);
148 pwm_config(pb->pwm, 0, pb->period); 150 pwm_config(pb->pwm, 0, pb->period);
149 pwm_disable(pb->pwm); 151 pwm_disable(pb->pwm);
150 return 0; 152 return 0;