Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit eee8ab75 authored by Dmitry Torokhov's avatar Dmitry Torokhov Committed by Linus Torvalds
Browse files

[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: default avatarDmitry Torokhov <dtor@mail.ru>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent d39b6cfe
Loading
Loading
Loading
Loading
+15 −5
Original line number Diff line number Diff line
@@ -228,14 +228,24 @@ static int __init mv64x60_wdt_init(void)

	printk(KERN_INFO "MV64x60 watchdog driver\n");

	mv64x60_wdt_dev = platform_device_register_simple(MV64x60_WDT_NAME,
							  -1, NULL, 0);
	if (IS_ERR(mv64x60_wdt_dev)) {
		ret = PTR_ERR(mv64x60_wdt_dev);
	mv64x60_wdt_dev = platform_device_alloc(MV64x60_WDT_NAME, -1);
	if (!mv64x60_wdt_dev) {
		ret = -ENOMEM;
		goto out;
	}

	ret = platform_device_add(mv64x60_wdt_dev);
	if (ret) {
		platform_device_put(mv64x60_wdt_dev);
		goto out;
	}

	ret = platform_driver_register(&mv64x60_wdt_driver);
	if (ret) {
		platform_device_unregister(mv64x60_wdt_dev);
		goto out;
	}

 out:
	return ret;
}