Skip to content

Commit

Permalink
atmel_lcdfb: blank the backlight on remove
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Richard Genoud authored and Jean-Christophe PLAGNIOL-VILLARD committed May 31, 2013
1 parent 65ac057 commit 56c21b5
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions drivers/video/atmel_lcdfb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 56c21b5

Please sign in to comment.