Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 365629
b: refs/heads/master
c: eba3bfb
h: refs/heads/master
i:
  365627: 8615d25
v: v3
  • Loading branch information
Jingoo Han authored and Linus Torvalds committed Apr 30, 2013
1 parent 7bdbd1e commit 0b9ce34
Show file tree
Hide file tree
Showing 2 changed files with 10 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: ef73e632fe48b97e67cbff339f9e7d30535d682f
refs/heads/master: eba3bfb4c086ead379430439f7bf710697e62c45
20 changes: 9 additions & 11 deletions trunk/drivers/video/backlight/ld9040.c
Original file line number Diff line number Diff line change
Expand Up @@ -775,12 +775,12 @@ static int ld9040_remove(struct spi_device *spi)
return 0;
}

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

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

lcd->power = FB_BLANK_POWERDOWN;

return ld9040_power(lcd, FB_BLANK_UNBLANK);
}
#else
#define ld9040_suspend NULL
#define ld9040_resume NULL
#endif

static SIMPLE_DEV_PM_OPS(ld9040_pm_ops, ld9040_suspend, ld9040_resume);

/* Power down all displays on reboot, poweroff or halt. */
static void ld9040_shutdown(struct spi_device *spi)
{
Expand All @@ -814,12 +813,11 @@ static struct spi_driver ld9040_driver = {
.driver = {
.name = "ld9040",
.owner = THIS_MODULE,
.pm = &ld9040_pm_ops,
},
.probe = ld9040_probe,
.remove = ld9040_remove,
.shutdown = ld9040_shutdown,
.suspend = ld9040_suspend,
.resume = ld9040_resume,
};

module_spi_driver(ld9040_driver);
Expand Down

0 comments on commit 0b9ce34

Please sign in to comment.