]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
MIPS: ath79: use dynamically allocated watchdog device
authorGabor Juhos <juhosg@openwrt.org>
Thu, 27 Dec 2012 14:38:25 +0000 (15:38 +0100)
committerWim Van Sebroeck <wim@iguana.be>
Wed, 30 Jan 2013 19:50:00 +0000 (20:50 +0100)
Remove the static watchdog device variable and use
the 'platform_device_register_simple' helper to
allocate and register the device in one step.

This allows us to save a few bytes in the kernel image.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
arch/mips/ath79/dev-common.c

index 45efc63b08b65a981b00dde2fb8526eb1d2382d9..2093b1b2a1d14c1fa5c2bb123c35ea8f39e62323 100644 (file)
@@ -101,12 +101,7 @@ void __init ath79_register_uart(void)
        }
 }
 
-static struct platform_device ath79_wdt_device = {
-       .name           = "ath79-wdt",
-       .id             = -1,
-};
-
 void __init ath79_register_wdt(void)
 {
-       platform_device_register(&ath79_wdt_device);
+       platform_device_register_simple("ath79-wdt", -1, NULL, 0);
 }