Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 365630
b: refs/heads/master
c: 26cd2a4
h: refs/heads/master
v: v3
  • Loading branch information
Jingoo Han authored and Linus Torvalds committed Apr 30, 2013
1 parent 0b9ce34 commit ca4ffc6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: eba3bfb4c086ead379430439f7bf710697e62c45
refs/heads/master: 26cd2a440cbe5e0d54b59ab1a3d25cbf15b2cfd5
22 changes: 10 additions & 12 deletions trunk/drivers/video/backlight/lms501kf03.c
Original file line number Diff line number Diff line change
Expand Up @@ -387,13 +387,12 @@ static int lms501kf03_remove(struct spi_device *spi)
return 0;
}

#if defined(CONFIG_PM)

static int lms501kf03_suspend(struct spi_device *spi, pm_message_t mesg)
#ifdef CONFIG_PM_SLEEP
static int lms501kf03_suspend(struct device *dev)
{
struct lms501kf03 *lcd = spi_get_drvdata(spi);
struct lms501kf03 *lcd = dev_get_drvdata(dev);

dev_dbg(&spi->dev, "lcd->power = %d\n", lcd->power);
dev_dbg(dev, "lcd->power = %d\n", lcd->power);

/*
* when lcd panel is suspend, lcd panel becomes off
Expand All @@ -402,19 +401,19 @@ static int lms501kf03_suspend(struct spi_device *spi, pm_message_t mesg)
return lms501kf03_power(lcd, FB_BLANK_POWERDOWN);
}

static int lms501kf03_resume(struct spi_device *spi)
static int lms501kf03_resume(struct device *dev)
{
struct lms501kf03 *lcd = spi_get_drvdata(spi);
struct lms501kf03 *lcd = dev_get_drvdata(dev);

lcd->power = FB_BLANK_POWERDOWN;

return lms501kf03_power(lcd, FB_BLANK_UNBLANK);
}
#else
#define lms501kf03_suspend NULL
#define lms501kf03_resume NULL
#endif

static SIMPLE_DEV_PM_OPS(lms501kf03_pm_ops, lms501kf03_suspend,
lms501kf03_resume);

static void lms501kf03_shutdown(struct spi_device *spi)
{
struct lms501kf03 *lcd = spi_get_drvdata(spi);
Expand All @@ -426,12 +425,11 @@ static struct spi_driver lms501kf03_driver = {
.driver = {
.name = "lms501kf03",
.owner = THIS_MODULE,
.pm = &lms501kf03_pm_ops,
},
.probe = lms501kf03_probe,
.remove = lms501kf03_remove,
.shutdown = lms501kf03_shutdown,
.suspend = lms501kf03_suspend,
.resume = lms501kf03_resume,
};

module_spi_driver(lms501kf03_driver);
Expand Down

0 comments on commit ca4ffc6

Please sign in to comment.