Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 365641
b: refs/heads/master
c: a71ed77
h: refs/heads/master
i:
  365639: eaca5f8
v: v3
  • Loading branch information
Jingoo Han authored and Linus Torvalds committed Apr 30, 2013
1 parent b6577f8 commit 05fb3bf
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 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: 5a3778e2f57e5fb1f6e060586f5850dd87b5320f
refs/heads/master: a71ed77b3ac5bb6ce3515fa9d0b9ad2c84919a2c
18 changes: 8 additions & 10 deletions trunk/drivers/video/backlight/ltv350qv.c
Original file line number Diff line number Diff line change
Expand Up @@ -271,25 +271,24 @@ static int ltv350qv_remove(struct spi_device *spi)
return 0;
}

#ifdef CONFIG_PM
static int ltv350qv_suspend(struct spi_device *spi, pm_message_t state)
#ifdef CONFIG_PM_SLEEP
static int ltv350qv_suspend(struct device *dev)
{
struct ltv350qv *lcd = spi_get_drvdata(spi);
struct ltv350qv *lcd = dev_get_drvdata(dev);

return ltv350qv_power(lcd, FB_BLANK_POWERDOWN);
}

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

return ltv350qv_power(lcd, FB_BLANK_UNBLANK);
}
#else
#define ltv350qv_suspend NULL
#define ltv350qv_resume NULL
#endif

static SIMPLE_DEV_PM_OPS(ltv350qv_pm_ops, ltv350qv_suspend, ltv350qv_resume);

/* Power down all displays on reboot, poweroff or halt */
static void ltv350qv_shutdown(struct spi_device *spi)
{
Expand All @@ -302,13 +301,12 @@ static struct spi_driver ltv350qv_driver = {
.driver = {
.name = "ltv350qv",
.owner = THIS_MODULE,
.pm = &ltv350qv_pm_ops,
},

.probe = ltv350qv_probe,
.remove = ltv350qv_remove,
.shutdown = ltv350qv_shutdown,
.suspend = ltv350qv_suspend,
.resume = ltv350qv_resume,
};

module_spi_driver(ltv350qv_driver);
Expand Down

0 comments on commit 05fb3bf

Please sign in to comment.