1 From 5e25d5207d21e65b5a2e58b64aba6804653e95b8 Mon Sep 17 00:00:00 2001
2 From: Gabor Juhos <juhosg@openwrt.org>
3 Date: Thu, 27 Dec 2012 15:38:25 +0100
4 Subject: [PATCH] MIPS: ath79: use dynamically allocated watchdog device
6 commit 0f2ad9ed7c6fecb008372e8a709595a2a21059aa upstream.
8 Remove the static watchdog device variable and use
9 the 'platform_device_register_simple' helper to
10 allocate and register the device in one step.
12 This allows us to save a few bytes in the kernel image.
14 Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
15 Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
17 arch/mips/ath79/dev-common.c | 7 +------
18 1 file changed, 1 insertion(+), 6 deletions(-)
20 --- a/arch/mips/ath79/dev-common.c
21 +++ b/arch/mips/ath79/dev-common.c
22 @@ -102,12 +102,7 @@ void __init ath79_register_uart(void)
26 -static struct platform_device ath79_wdt_device = {
27 - .name = "ath79-wdt",
31 void __init ath79_register_wdt(void)
33 - platform_device_register(&ath79_wdt_device);
34 + platform_device_register_simple("ath79-wdt", -1, NULL, 0);