Skip to content

Commit

Permalink
watchdog: ath79_wdt: convert to use module_platform_driver
Browse files Browse the repository at this point in the history
This makes the code a bit smaller by getting rid of
some boilerplate code.

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 Dec 19, 2012
1 parent 2f0bf92 commit 8157bec
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions drivers/watchdog/ath79_wdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,7 @@ static void ath97_wdt_shutdown(struct platform_device *pdev)
}

static struct platform_driver ath79_wdt_driver = {
.probe = ath79_wdt_probe,
.remove = ath79_wdt_remove,
.shutdown = ath97_wdt_shutdown,
.driver = {
Expand All @@ -292,17 +293,7 @@ static struct platform_driver ath79_wdt_driver = {
},
};

static int __init ath79_wdt_init(void)
{
return platform_driver_probe(&ath79_wdt_driver, ath79_wdt_probe);
}
module_init(ath79_wdt_init);

static void __exit ath79_wdt_exit(void)
{
platform_driver_unregister(&ath79_wdt_driver);
}
module_exit(ath79_wdt_exit);
module_platform_driver(ath79_wdt_driver);

MODULE_DESCRIPTION("Atheros AR71XX/AR724X/AR913X hardware watchdog driver");
MODULE_AUTHOR("Gabor Juhos <juhosg@openwrt.org");
Expand Down

0 comments on commit 8157bec

Please sign in to comment.