From: Gabor Juhos Date: Thu, 27 Dec 2012 14:38:25 +0000 (+0100) Subject: MIPS: ath79: use dynamically allocated watchdog device X-Git-Tag: next-20130218~46^2~15 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=4aab051f141cbd889c0707513f082b6c255437b2;p=karo-tx-linux.git MIPS: ath79: use dynamically allocated watchdog device 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 Signed-off-by: Wim Van Sebroeck --- diff --git a/arch/mips/ath79/dev-common.c b/arch/mips/ath79/dev-common.c index 45efc63b08b6..2093b1b2a1d1 100644 --- a/arch/mips/ath79/dev-common.c +++ b/arch/mips/ath79/dev-common.c @@ -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); }