diff options
Diffstat (limited to 'drivers/char')
-rw-r--r-- | drivers/char/sonypi.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/char/sonypi.c b/drivers/char/sonypi.c index 45713f0e7d61..f87780502b41 100644 --- a/drivers/char/sonypi.c +++ b/drivers/char/sonypi.c | |||
@@ -1459,7 +1459,7 @@ static int __devexit sonypi_remove(struct platform_device *dev) | |||
1459 | #ifdef CONFIG_PM | 1459 | #ifdef CONFIG_PM |
1460 | static int old_camera_power; | 1460 | static int old_camera_power; |
1461 | 1461 | ||
1462 | static int sonypi_suspend(struct platform_device *dev, pm_message_t state) | 1462 | static int sonypi_suspend(struct device *dev) |
1463 | { | 1463 | { |
1464 | old_camera_power = sonypi_device.camera_power; | 1464 | old_camera_power = sonypi_device.camera_power; |
1465 | sonypi_disable(); | 1465 | sonypi_disable(); |
@@ -1467,14 +1467,16 @@ static int sonypi_suspend(struct platform_device *dev, pm_message_t state) | |||
1467 | return 0; | 1467 | return 0; |
1468 | } | 1468 | } |
1469 | 1469 | ||
1470 | static int sonypi_resume(struct platform_device *dev) | 1470 | static int sonypi_resume(struct device *dev) |
1471 | { | 1471 | { |
1472 | sonypi_enable(old_camera_power); | 1472 | sonypi_enable(old_camera_power); |
1473 | return 0; | 1473 | return 0; |
1474 | } | 1474 | } |
1475 | |||
1476 | static SIMPLE_DEV_PM_OPS(sonypi_pm, sonypi_suspend, sonypi_resume); | ||
1477 | #define SONYPI_PM (&sonypi_pm) | ||
1475 | #else | 1478 | #else |
1476 | #define sonypi_suspend NULL | 1479 | #define SONYPI_PM NULL |
1477 | #define sonypi_resume NULL | ||
1478 | #endif | 1480 | #endif |
1479 | 1481 | ||
1480 | static void sonypi_shutdown(struct platform_device *dev) | 1482 | static void sonypi_shutdown(struct platform_device *dev) |
@@ -1486,12 +1488,11 @@ static struct platform_driver sonypi_driver = { | |||
1486 | .driver = { | 1488 | .driver = { |
1487 | .name = "sonypi", | 1489 | .name = "sonypi", |
1488 | .owner = THIS_MODULE, | 1490 | .owner = THIS_MODULE, |
1491 | .pm = SONYPI_PM, | ||
1489 | }, | 1492 | }, |
1490 | .probe = sonypi_probe, | 1493 | .probe = sonypi_probe, |
1491 | .remove = __devexit_p(sonypi_remove), | 1494 | .remove = __devexit_p(sonypi_remove), |
1492 | .shutdown = sonypi_shutdown, | 1495 | .shutdown = sonypi_shutdown, |
1493 | .suspend = sonypi_suspend, | ||
1494 | .resume = sonypi_resume, | ||
1495 | }; | 1496 | }; |
1496 | 1497 | ||
1497 | static struct platform_device *sonypi_platform_device; | 1498 | static struct platform_device *sonypi_platform_device; |