diff options
Diffstat (limited to 'drivers/watchdog/acquirewdt.c')
-rw-r--r-- | drivers/watchdog/acquirewdt.c | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/drivers/watchdog/acquirewdt.c b/drivers/watchdog/acquirewdt.c index 5cf1621def9c..5614416f1032 100644 --- a/drivers/watchdog/acquirewdt.c +++ b/drivers/watchdog/acquirewdt.c | |||
@@ -239,7 +239,7 @@ static struct miscdevice acq_miscdev = { | |||
239 | * Init & exit routines | 239 | * Init & exit routines |
240 | */ | 240 | */ |
241 | 241 | ||
242 | static int acq_probe(struct platform_device *dev) | 242 | static int __init acq_probe(struct platform_device *dev) |
243 | { | 243 | { |
244 | int ret; | 244 | int ret; |
245 | 245 | ||
@@ -291,7 +291,6 @@ static void acq_shutdown(struct platform_device *dev) | |||
291 | } | 291 | } |
292 | 292 | ||
293 | static struct platform_driver acquirewdt_driver = { | 293 | static struct platform_driver acquirewdt_driver = { |
294 | .probe = acq_probe, | ||
295 | .remove = acq_remove, | 294 | .remove = acq_remove, |
296 | .shutdown = acq_shutdown, | 295 | .shutdown = acq_shutdown, |
297 | .driver = { | 296 | .driver = { |
@@ -306,20 +305,18 @@ static int __init acq_init(void) | |||
306 | 305 | ||
307 | pr_info("WDT driver for Acquire single board computer initialising\n"); | 306 | pr_info("WDT driver for Acquire single board computer initialising\n"); |
308 | 307 | ||
309 | err = platform_driver_register(&acquirewdt_driver); | ||
310 | if (err) | ||
311 | return err; | ||
312 | |||
313 | acq_platform_device = platform_device_register_simple(DRV_NAME, | 308 | acq_platform_device = platform_device_register_simple(DRV_NAME, |
314 | -1, NULL, 0); | 309 | -1, NULL, 0); |
315 | if (IS_ERR(acq_platform_device)) { | 310 | if (IS_ERR(acq_platform_device)) |
316 | err = PTR_ERR(acq_platform_device); | 311 | return PTR_ERR(acq_platform_device); |
317 | goto unreg_platform_driver; | 312 | |
318 | } | 313 | err = platform_driver_probe(&acquirewdt_driver, acq_probe); |
314 | if (err) | ||
315 | goto unreg_platform_device; | ||
319 | return 0; | 316 | return 0; |
320 | 317 | ||
321 | unreg_platform_driver: | 318 | unreg_platform_device: |
322 | platform_driver_unregister(&acquirewdt_driver); | 319 | platform_device_unregister(acq_platform_device); |
323 | return err; | 320 | return err; |
324 | } | 321 | } |
325 | 322 | ||