aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/watchdog
diff options
context:
space:
mode:
authorDmitry Torokhov <dtor_core@ameritech.net>2006-03-22 03:07:54 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-22 10:53:56 -0500
commiteee8ab75c609fa0c452246f69237ff577b931243 (patch)
treeb0dd3e1b8ec8e084411b87ae96f9b10bc29c84b3 /drivers/char/watchdog
parentd39b6cfe664079ca79ae1cfebac4725a877fd61d (diff)
[PATCH] mv64x600_wdt: convert to the new platform device interface
mv64x600_wdt: convert to the new platform device interface Do not use platform_device_register_simple() as it is going away. Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/char/watchdog')
-rw-r--r--drivers/char/watchdog/mv64x60_wdt.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/drivers/char/watchdog/mv64x60_wdt.c b/drivers/char/watchdog/mv64x60_wdt.c
index 00d9ef04a369..f1b9cf89f153 100644
--- a/drivers/char/watchdog/mv64x60_wdt.c
+++ b/drivers/char/watchdog/mv64x60_wdt.c
@@ -228,15 +228,25 @@ static int __init mv64x60_wdt_init(void)
228 228
229 printk(KERN_INFO "MV64x60 watchdog driver\n"); 229 printk(KERN_INFO "MV64x60 watchdog driver\n");
230 230
231 mv64x60_wdt_dev = platform_device_register_simple(MV64x60_WDT_NAME, 231 mv64x60_wdt_dev = platform_device_alloc(MV64x60_WDT_NAME, -1);
232 -1, NULL, 0); 232 if (!mv64x60_wdt_dev) {
233 if (IS_ERR(mv64x60_wdt_dev)) { 233 ret = -ENOMEM;
234 ret = PTR_ERR(mv64x60_wdt_dev); 234 goto out;
235 }
236
237 ret = platform_device_add(mv64x60_wdt_dev);
238 if (ret) {
239 platform_device_put(mv64x60_wdt_dev);
235 goto out; 240 goto out;
236 } 241 }
237 242
238 ret = platform_driver_register(&mv64x60_wdt_driver); 243 ret = platform_driver_register(&mv64x60_wdt_driver);
239 out: 244 if (ret) {
245 platform_device_unregister(mv64x60_wdt_dev);
246 goto out;
247 }
248
249 out:
240 return ret; 250 return ret;
241} 251}
242 252