Commit 8157becf authored by Gabor Juhos's avatar Gabor Juhos Committed by Wim Van Sebroeck

watchdog: ath79_wdt: convert to use module_platform_driver

This makes the code a bit smaller by getting rid of
some boilerplate code.
Signed-off-by: default avatarGabor Juhos <juhosg@openwrt.org>
Signed-off-by: default avatarWim Van Sebroeck <wim@iguana.be>
parent 2f0bf925
...@@ -284,6 +284,7 @@ static void ath97_wdt_shutdown(struct platform_device *pdev) ...@@ -284,6 +284,7 @@ static void ath97_wdt_shutdown(struct platform_device *pdev)
} }
static struct platform_driver ath79_wdt_driver = { static struct platform_driver ath79_wdt_driver = {
.probe = ath79_wdt_probe,
.remove = ath79_wdt_remove, .remove = ath79_wdt_remove,
.shutdown = ath97_wdt_shutdown, .shutdown = ath97_wdt_shutdown,
.driver = { .driver = {
...@@ -292,17 +293,7 @@ static struct platform_driver ath79_wdt_driver = { ...@@ -292,17 +293,7 @@ static struct platform_driver ath79_wdt_driver = {
}, },
}; };
static int __init ath79_wdt_init(void) module_platform_driver(ath79_wdt_driver);
{
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_DESCRIPTION("Atheros AR71XX/AR724X/AR913X hardware watchdog driver"); MODULE_DESCRIPTION("Atheros AR71XX/AR724X/AR913X hardware watchdog driver");
MODULE_AUTHOR("Gabor Juhos <juhosg@openwrt.org"); MODULE_AUTHOR("Gabor Juhos <juhosg@openwrt.org");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment