Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 365642
b: refs/heads/master
c: 3e14e68
h: refs/heads/master
v: v3
  • Loading branch information
Jingoo Han authored and Linus Torvalds committed Apr 30, 2013
1 parent 05fb3bf commit 2c8b25a
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: a71ed77b3ac5bb6ce3515fa9d0b9ad2c84919a2c
refs/heads/master: 3e14e689496a36cfa4d034cb4fcf98deee363d7c
18 changes: 8 additions & 10 deletions trunk/drivers/video/backlight/tdo24m.c
Original file line number Diff line number Diff line change
Expand Up @@ -412,25 +412,24 @@ static int tdo24m_remove(struct spi_device *spi)
return 0;
}

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

return tdo24m_power(lcd, FB_BLANK_POWERDOWN);
}

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

return tdo24m_power(lcd, FB_BLANK_UNBLANK);
}
#else
#define tdo24m_suspend NULL
#define tdo24m_resume NULL
#endif

static SIMPLE_DEV_PM_OPS(tdo24m_pm_ops, tdo24m_suspend, tdo24m_resume);

/* Power down all displays on reboot, poweroff or halt */
static void tdo24m_shutdown(struct spi_device *spi)
{
Expand All @@ -443,12 +442,11 @@ static struct spi_driver tdo24m_driver = {
.driver = {
.name = "tdo24m",
.owner = THIS_MODULE,
.pm = &tdo24m_pm_ops,
},
.probe = tdo24m_probe,
.remove = tdo24m_remove,
.shutdown = tdo24m_shutdown,
.suspend = tdo24m_suspend,
.resume = tdo24m_resume,
};

module_spi_driver(tdo24m_driver);
Expand Down

0 comments on commit 2c8b25a

Please sign in to comment.