Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 365618
b: refs/heads/master
c: ba3601a
h: refs/heads/master
v: v3
  • Loading branch information
Jingoo Han authored and Linus Torvalds committed Apr 30, 2013
1 parent ef60e39 commit e131e18
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 12 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: a16b945c3248b4cffbc63c9df61b293af84ab94d
refs/heads/master: ba3601a99fde549707f5f869c977c0072fee04e1
21 changes: 10 additions & 11 deletions trunk/drivers/video/backlight/ams369fg06.c
Original file line number Diff line number Diff line change
Expand Up @@ -533,12 +533,12 @@ static int ams369fg06_remove(struct spi_device *spi)
return 0;
}

#if defined(CONFIG_PM)
static int ams369fg06_suspend(struct spi_device *spi, pm_message_t mesg)
#ifdef CONFIG_PM_SLEEP
static int ams369fg06_suspend(struct device *dev)
{
struct ams369fg06 *lcd = spi_get_drvdata(spi);
struct ams369fg06 *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 @@ -547,19 +547,19 @@ static int ams369fg06_suspend(struct spi_device *spi, pm_message_t mesg)
return ams369fg06_power(lcd, FB_BLANK_POWERDOWN);
}

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

lcd->power = FB_BLANK_POWERDOWN;

return ams369fg06_power(lcd, FB_BLANK_UNBLANK);
}
#else
#define ams369fg06_suspend NULL
#define ams369fg06_resume NULL
#endif

static SIMPLE_DEV_PM_OPS(ams369fg06_pm_ops, ams369fg06_suspend,
ams369fg06_resume);

static void ams369fg06_shutdown(struct spi_device *spi)
{
struct ams369fg06 *lcd = spi_get_drvdata(spi);
Expand All @@ -571,12 +571,11 @@ static struct spi_driver ams369fg06_driver = {
.driver = {
.name = "ams369fg06",
.owner = THIS_MODULE,
.pm = &ams369fg06_pm_ops,
},
.probe = ams369fg06_probe,
.remove = ams369fg06_remove,
.shutdown = ams369fg06_shutdown,
.suspend = ams369fg06_suspend,
.resume = ams369fg06_resume,
};

module_spi_driver(ams369fg06_driver);
Expand Down

0 comments on commit e131e18

Please sign in to comment.