diff options
Diffstat (limited to 'drivers/input/misc/sparcspkr.c')
-rw-r--r-- | drivers/input/misc/sparcspkr.c | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/drivers/input/misc/sparcspkr.c b/drivers/input/misc/sparcspkr.c index 1dacae4b43f0..8e130bf7d32b 100644 --- a/drivers/input/misc/sparcspkr.c +++ b/drivers/input/misc/sparcspkr.c | |||
@@ -173,7 +173,7 @@ static int __devinit sparcspkr_probe(struct device *dev) | |||
173 | return 0; | 173 | return 0; |
174 | } | 174 | } |
175 | 175 | ||
176 | static int sparcspkr_shutdown(struct of_device *dev) | 176 | static int sparcspkr_shutdown(struct platform_device *dev) |
177 | { | 177 | { |
178 | struct sparcspkr_state *state = dev_get_drvdata(&dev->dev); | 178 | struct sparcspkr_state *state = dev_get_drvdata(&dev->dev); |
179 | struct input_dev *input_dev = state->input_dev; | 179 | struct input_dev *input_dev = state->input_dev; |
@@ -184,7 +184,7 @@ static int sparcspkr_shutdown(struct of_device *dev) | |||
184 | return 0; | 184 | return 0; |
185 | } | 185 | } |
186 | 186 | ||
187 | static int __devinit bbc_beep_probe(struct of_device *op, const struct of_device_id *match) | 187 | static int __devinit bbc_beep_probe(struct platform_device *op, const struct of_device_id *match) |
188 | { | 188 | { |
189 | struct sparcspkr_state *state; | 189 | struct sparcspkr_state *state; |
190 | struct bbc_beep_info *info; | 190 | struct bbc_beep_info *info; |
@@ -231,7 +231,7 @@ out_err: | |||
231 | return err; | 231 | return err; |
232 | } | 232 | } |
233 | 233 | ||
234 | static int __devexit bbc_remove(struct of_device *op) | 234 | static int __devexit bbc_remove(struct platform_device *op) |
235 | { | 235 | { |
236 | struct sparcspkr_state *state = dev_get_drvdata(&op->dev); | 236 | struct sparcspkr_state *state = dev_get_drvdata(&op->dev); |
237 | struct input_dev *input_dev = state->input_dev; | 237 | struct input_dev *input_dev = state->input_dev; |
@@ -269,7 +269,7 @@ static struct of_platform_driver bbc_beep_driver = { | |||
269 | .shutdown = sparcspkr_shutdown, | 269 | .shutdown = sparcspkr_shutdown, |
270 | }; | 270 | }; |
271 | 271 | ||
272 | static int __devinit grover_beep_probe(struct of_device *op, const struct of_device_id *match) | 272 | static int __devinit grover_beep_probe(struct platform_device *op, const struct of_device_id *match) |
273 | { | 273 | { |
274 | struct sparcspkr_state *state; | 274 | struct sparcspkr_state *state; |
275 | struct grover_beep_info *info; | 275 | struct grover_beep_info *info; |
@@ -312,7 +312,7 @@ out_err: | |||
312 | return err; | 312 | return err; |
313 | } | 313 | } |
314 | 314 | ||
315 | static int __devexit grover_remove(struct of_device *op) | 315 | static int __devexit grover_remove(struct platform_device *op) |
316 | { | 316 | { |
317 | struct sparcspkr_state *state = dev_get_drvdata(&op->dev); | 317 | struct sparcspkr_state *state = dev_get_drvdata(&op->dev); |
318 | struct grover_beep_info *info = &state->u.grover; | 318 | struct grover_beep_info *info = &state->u.grover; |
@@ -353,14 +353,12 @@ static struct of_platform_driver grover_beep_driver = { | |||
353 | 353 | ||
354 | static int __init sparcspkr_init(void) | 354 | static int __init sparcspkr_init(void) |
355 | { | 355 | { |
356 | int err = of_register_driver(&bbc_beep_driver, | 356 | int err = of_register_platform_driver(&bbc_beep_driver); |
357 | &of_platform_bus_type); | ||
358 | 357 | ||
359 | if (!err) { | 358 | if (!err) { |
360 | err = of_register_driver(&grover_beep_driver, | 359 | err = of_register_platform_driver(&grover_beep_driver); |
361 | &of_platform_bus_type); | ||
362 | if (err) | 360 | if (err) |
363 | of_unregister_driver(&bbc_beep_driver); | 361 | of_unregister_platform_driver(&bbc_beep_driver); |
364 | } | 362 | } |
365 | 363 | ||
366 | return err; | 364 | return err; |
@@ -368,8 +366,8 @@ static int __init sparcspkr_init(void) | |||
368 | 366 | ||
369 | static void __exit sparcspkr_exit(void) | 367 | static void __exit sparcspkr_exit(void) |
370 | { | 368 | { |
371 | of_unregister_driver(&bbc_beep_driver); | 369 | of_unregister_platform_driver(&bbc_beep_driver); |
372 | of_unregister_driver(&grover_beep_driver); | 370 | of_unregister_platform_driver(&grover_beep_driver); |
373 | } | 371 | } |
374 | 372 | ||
375 | module_init(sparcspkr_init); | 373 | module_init(sparcspkr_init); |