Skip to content

Commit

Permalink
MIPS: ath79: use dynamically allocated watchdog device
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Gabor Juhos authored and Wim Van Sebroeck committed Mar 1, 2013
1 parent 5071a88 commit 0f2ad9e
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions arch/mips/ath79/dev-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

0 comments on commit 0f2ad9e

Please sign in to comment.