diff options
Diffstat (limited to 'drivers/input/misc/pcspkr.c')
-rw-r--r-- | drivers/input/misc/pcspkr.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/input/misc/pcspkr.c b/drivers/input/misc/pcspkr.c index d6a30cee7bc..21cb755a54f 100644 --- a/drivers/input/misc/pcspkr.c +++ b/drivers/input/misc/pcspkr.c @@ -17,6 +17,7 @@ #include <linux/init.h> #include <linux/input.h> #include <linux/platform_device.h> +#include <linux/timex.h> #include <asm/io.h> MODULE_AUTHOR("Vojtech Pavlik <vojtech@ucw.cz>"); @@ -113,7 +114,7 @@ static int __devexit pcspkr_remove(struct platform_device *dev) return 0; } -static int pcspkr_suspend(struct platform_device *dev, pm_message_t state) +static int pcspkr_suspend(struct device *dev) { pcspkr_event(NULL, EV_SND, SND_BELL, 0); @@ -126,14 +127,18 @@ static void pcspkr_shutdown(struct platform_device *dev) pcspkr_event(NULL, EV_SND, SND_BELL, 0); } +static struct dev_pm_ops pcspkr_pm_ops = { + .suspend = pcspkr_suspend, +}; + static struct platform_driver pcspkr_platform_driver = { .driver = { .name = "pcspkr", .owner = THIS_MODULE, + .pm = &pcspkr_pm_ops, }, .probe = pcspkr_probe, .remove = __devexit_p(pcspkr_remove), - .suspend = pcspkr_suspend, .shutdown = pcspkr_shutdown, }; |