Commit 56c21b53 authored by Richard Genoud's avatar Richard Genoud Committed by Jean-Christophe PLAGNIOL-VILLARD

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: default avatarRichard Genoud <richard.genoud@gmail.com>
Signed-off-by: default avatarJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
parent 65ac057b
...@@ -223,7 +223,13 @@ static void init_backlight(struct atmel_lcdfb_info *sinfo) ...@@ -223,7 +223,13 @@ static void init_backlight(struct atmel_lcdfb_info *sinfo)
static void exit_backlight(struct atmel_lcdfb_info *sinfo) static void exit_backlight(struct atmel_lcdfb_info *sinfo)
{ {
if (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); backlight_device_unregister(sinfo->backlight);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment