aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/misc/pcspkr.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/input/misc/pcspkr.c')
-rw-r--r--drivers/input/misc/pcspkr.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/input/misc/pcspkr.c b/drivers/input/misc/pcspkr.c
index d6a30cee7bc7..21cb755a54fb 100644
--- a/drivers/input/misc/pcspkr.c
+++ b/drivers/input/misc/pcspkr.c
@@ -17,6 +17,7 @@
17#include <linux/init.h> 17#include <linux/init.h>
18#include <linux/input.h> 18#include <linux/input.h>
19#include <linux/platform_device.h> 19#include <linux/platform_device.h>
20#include <linux/timex.h>
20#include <asm/io.h> 21#include <asm/io.h>
21 22
22MODULE_AUTHOR("Vojtech Pavlik <vojtech@ucw.cz>"); 23MODULE_AUTHOR("Vojtech Pavlik <vojtech@ucw.cz>");
@@ -113,7 +114,7 @@ static int __devexit pcspkr_remove(struct platform_device *dev)
113 return 0; 114 return 0;
114} 115}
115 116
116static int pcspkr_suspend(struct platform_device *dev, pm_message_t state) 117static int pcspkr_suspend(struct device *dev)
117{ 118{
118 pcspkr_event(NULL, EV_SND, SND_BELL, 0); 119 pcspkr_event(NULL, EV_SND, SND_BELL, 0);
119 120
@@ -126,14 +127,18 @@ static void pcspkr_shutdown(struct platform_device *dev)
126 pcspkr_event(NULL, EV_SND, SND_BELL, 0); 127 pcspkr_event(NULL, EV_SND, SND_BELL, 0);
127} 128}
128 129
130static struct dev_pm_ops pcspkr_pm_ops = {
131 .suspend = pcspkr_suspend,
132};
133
129static struct platform_driver pcspkr_platform_driver = { 134static struct platform_driver pcspkr_platform_driver = {
130 .driver = { 135 .driver = {
131 .name = "pcspkr", 136 .name = "pcspkr",
132 .owner = THIS_MODULE, 137 .owner = THIS_MODULE,
138 .pm = &pcspkr_pm_ops,
133 }, 139 },
134 .probe = pcspkr_probe, 140 .probe = pcspkr_probe,
135 .remove = __devexit_p(pcspkr_remove), 141 .remove = __devexit_p(pcspkr_remove),
136 .suspend = pcspkr_suspend,
137 .shutdown = pcspkr_shutdown, 142 .shutdown = pcspkr_shutdown,
138}; 143};
139 144