Skip to content

Commit 0f2ad9e

Browse files
juhosgWim Van Sebroeck
authored andcommitted
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 <juhosg@openwrt.org> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
1 parent 5071a88 commit 0f2ad9e

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

‎arch/mips/ath79/dev-common.c‎

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -101,12 +101,7 @@ void __init ath79_register_uart(void)
101101
}
102102
}
103103

104-
static struct platform_device ath79_wdt_device = {
105-
.name = "ath79-wdt",
106-
.id = -1,
107-
};
108-
109104
void __init ath79_register_wdt(void)
110105
{
111-
platform_device_register(&ath79_wdt_device);
106+
platform_device_register_simple("ath79-wdt", -1, NULL, 0);
112107
}

0 commit comments

Comments
 (0)