diff options
Diffstat (limited to 'drivers/video/backlight')
-rw-r--r-- | drivers/video/backlight/ams369fg06.c | 24 |
1 files changed, 3 insertions, 21 deletions
diff --git a/drivers/video/backlight/ams369fg06.c b/drivers/video/backlight/ams369fg06.c index 22756dd..4794a9a 100644 --- a/drivers/video/backlight/ams369fg06.c +++ b/drivers/video/backlight/ams369fg06.c @@ -545,44 +545,26 @@ static int ams369fg06_remove(struct spi_device *spi) } #if defined(CONFIG_PM) -static unsigned int before_power; - static int ams369fg06_suspend(struct spi_device *spi, pm_message_t mesg) { - int ret = 0; struct ams369fg06 *lcd = dev_get_drvdata(&spi->dev); dev_dbg(&spi->dev, "lcd->power = %d\n", lcd->power); - before_power = lcd->power; - /* * when lcd panel is suspend, lcd panel becomes off * regardless of status. */ - ret = ams369fg06_power(lcd, FB_BLANK_POWERDOWN); - - return ret; + return ams369fg06_power(lcd, FB_BLANK_POWERDOWN); } static int ams369fg06_resume(struct spi_device *spi) { - int ret = 0; struct ams369fg06 *lcd = dev_get_drvdata(&spi->dev); - /* - * after suspended, if lcd panel status is FB_BLANK_UNBLANK - * (at that time, before_power is FB_BLANK_UNBLANK) then - * it changes that status to FB_BLANK_POWERDOWN to get lcd on. - */ - if (before_power == FB_BLANK_UNBLANK) - lcd->power = FB_BLANK_POWERDOWN; + lcd->power = FB_BLANK_POWERDOWN; - dev_dbg(&spi->dev, "before_power = %d\n", before_power); - - ret = ams369fg06_power(lcd, before_power); - - return ret; + return ams369fg06_power(lcd, FB_BLANK_UNBLANK); } #else #define ams369fg06_suspend NULL |