Skip to content

Commit 35db715

Browse files
Frans Popdtor
authored andcommitted
Input: pcspkr - switch driver to dev_pm_ops
Gets rid of the following warning: Platform driver 'pcspkr' needs updating - please use dev_pm_ops Signed-off-by: Frans Pop <elendil@planet.nl> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
1 parent 70a6f2e commit 35db715

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

‎drivers/input/misc/pcspkr.c‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ static int __devexit pcspkr_remove(struct platform_device *dev)
113113
return 0;
114114
}
115115

116-
static int pcspkr_suspend(struct platform_device *dev, pm_message_t state)
116+
static int pcspkr_suspend(struct device *dev)
117117
{
118118
pcspkr_event(NULL, EV_SND, SND_BELL, 0);
119119

@@ -126,14 +126,18 @@ static void pcspkr_shutdown(struct platform_device *dev)
126126
pcspkr_event(NULL, EV_SND, SND_BELL, 0);
127127
}
128128

129+
static struct dev_pm_ops pcspkr_pm_ops = {
130+
.suspend = pcspkr_suspend,
131+
};
132+
129133
static struct platform_driver pcspkr_platform_driver = {
130134
.driver = {
131135
.name = "pcspkr",
132136
.owner = THIS_MODULE,
137+
.pm = &pcspkr_pm_ops,
133138
},
134139
.probe = pcspkr_probe,
135140
.remove = __devexit_p(pcspkr_remove),
136-
.suspend = pcspkr_suspend,
137141
.shutdown = pcspkr_shutdown,
138142
};
139143

0 commit comments

Comments
 (0)