diff options
author | Richard Genoud <richard.genoud@gmail.com> | 2013-05-31 15:49:35 +0000 |
---|---|---|
committer | Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | 2013-06-01 03:18:55 +0800 |
commit | 56c21b53ab071feb3ce93375a563ead745fa7105 (patch) | |
tree | c6c10744b170546f41b6467d0458d5203d0dadca /drivers/video/atmel_lcdfb.c | |
parent | 65ac057bce426b4abdf42384c4e09e40a634df32 (diff) | |
download | op-kernel-dev-56c21b53ab071feb3ce93375a563ead745fa7105.zip op-kernel-dev-56c21b53ab071feb3ce93375a563ead745fa7105.tar.gz |
atmel_lcdfb: blank the backlight on remove
When removing atmel_lcdfb module, the backlight is unregistered but not
blanked. (only for CONFIG_BACKLIGHT_ATMEL_LCDC case).
This can result in the screen going full white depending on how the PWM
is wired.
Signed-off-by: Richard Genoud <richard.genoud@gmail.com>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Diffstat (limited to 'drivers/video/atmel_lcdfb.c')
-rw-r--r-- | drivers/video/atmel_lcdfb.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/video/atmel_lcdfb.c b/drivers/video/atmel_lcdfb.c index 6e6491f..effdb37 100644 --- a/drivers/video/atmel_lcdfb.c +++ b/drivers/video/atmel_lcdfb.c @@ -223,8 +223,14 @@ static void init_backlight(struct atmel_lcdfb_info *sinfo) static void exit_backlight(struct atmel_lcdfb_info *sinfo) { - if (sinfo->backlight) - backlight_device_unregister(sinfo->backlight); + if (!sinfo->backlight) + return; + + if (sinfo->backlight->ops) { + sinfo->backlight->props.power = FB_BLANK_POWERDOWN; + sinfo->backlight->ops->update_status(sinfo->backlight); + } + backlight_device_unregister(sinfo->backlight); } #else |