Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 312761
b: refs/heads/master
c: 199ac05
h: refs/heads/master
i:
  312759: fc531cc
v: v3
  • Loading branch information
Rafael J. Wysocki committed Jul 1, 2012
1 parent 126b516 commit ab0d5a7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 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: 8ff847fc21e53be0e2ebd476ce6269a201575152
refs/heads/master: 199ac0529eac0341b232b450e43fad71d1513e94
13 changes: 7 additions & 6 deletions trunk/drivers/char/sonypi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1459,22 +1459,24 @@ static int __devexit sonypi_remove(struct platform_device *dev)
#ifdef CONFIG_PM
static int old_camera_power;

static int sonypi_suspend(struct platform_device *dev, pm_message_t state)
static int sonypi_suspend(struct device *dev)
{
old_camera_power = sonypi_device.camera_power;
sonypi_disable();

return 0;
}

static int sonypi_resume(struct platform_device *dev)
static int sonypi_resume(struct device *dev)
{
sonypi_enable(old_camera_power);
return 0;
}

static SIMPLE_DEV_PM_OPS(sonypi_pm, sonypi_suspend, sonypi_resume);
#define SONYPI_PM (&sonypi_pm)
#else
#define sonypi_suspend NULL
#define sonypi_resume NULL
#define SONYPI_PM NULL
#endif

static void sonypi_shutdown(struct platform_device *dev)
Expand All @@ -1486,12 +1488,11 @@ static struct platform_driver sonypi_driver = {
.driver = {
.name = "sonypi",
.owner = THIS_MODULE,
.pm = SONYPI_PM,
},
.probe = sonypi_probe,
.remove = __devexit_p(sonypi_remove),
.shutdown = sonypi_shutdown,
.suspend = sonypi_suspend,
.resume = sonypi_resume,
};

static struct platform_device *sonypi_platform_device;
Expand Down

0 comments on commit ab0d5a7

Please sign in to comment.