提交 f37d193c 编写于 作者: K Kay Sievers 提交者: Linus Torvalds

watchdog: fix platform driver hotplug/coldplug

Since 43cc71ee, the platform modalias is
prefixed with "platform:".  Add MODULE_ALIAS() to the hotpluggable watchdog
drivers, to re-enable auto loading.

[dbrownell@users.sourceforge.net: more drivers; registration fixes]
Signed-off-by: NKay Sievers <kay.sievers@vrfy.org>
Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
Cc: Wim Van Sebroeck <wim@iguana.be>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 f4fce61d
...@@ -418,6 +418,9 @@ static int at32_wdt_resume(struct platform_device *pdev) ...@@ -418,6 +418,9 @@ static int at32_wdt_resume(struct platform_device *pdev)
#define at32_wdt_resume NULL #define at32_wdt_resume NULL
#endif #endif
/* work with hotplug and coldplug */
MODULE_ALIAS("platform:at32_wdt");
static struct platform_driver at32_wdt_driver = { static struct platform_driver at32_wdt_driver = {
.remove = __exit_p(at32_wdt_remove), .remove = __exit_p(at32_wdt_remove),
.suspend = at32_wdt_suspend, .suspend = at32_wdt_suspend,
......
...@@ -286,3 +286,4 @@ MODULE_AUTHOR("Andrew Victor"); ...@@ -286,3 +286,4 @@ MODULE_AUTHOR("Andrew Victor");
MODULE_DESCRIPTION("Watchdog driver for Atmel AT91RM9200"); MODULE_DESCRIPTION("Watchdog driver for Atmel AT91RM9200");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR); MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR);
MODULE_ALIAS("platform:at91_wdt");
...@@ -248,6 +248,7 @@ static int davinci_wdt_remove(struct platform_device *pdev) ...@@ -248,6 +248,7 @@ static int davinci_wdt_remove(struct platform_device *pdev)
static struct platform_driver platform_wdt_driver = { static struct platform_driver platform_wdt_driver = {
.driver = { .driver = {
.name = "watchdog", .name = "watchdog",
.owner = THIS_MODULE,
}, },
.probe = davinci_wdt_probe, .probe = davinci_wdt_probe,
.remove = davinci_wdt_remove, .remove = davinci_wdt_remove,
...@@ -277,3 +278,4 @@ MODULE_PARM_DESC(heartbeat, ...@@ -277,3 +278,4 @@ MODULE_PARM_DESC(heartbeat,
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR); MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR);
MODULE_ALIAS("platform:watchdog");
...@@ -306,3 +306,4 @@ MODULE_AUTHOR("Andrew Victor"); ...@@ -306,3 +306,4 @@ MODULE_AUTHOR("Andrew Victor");
MODULE_DESCRIPTION("Watchdog driver for KS8695"); MODULE_DESCRIPTION("Watchdog driver for KS8695");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR); MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR);
MODULE_ALIAS("platform:ks8695_wdt");
...@@ -206,6 +206,7 @@ static struct platform_driver mpc83xx_wdt_driver = { ...@@ -206,6 +206,7 @@ static struct platform_driver mpc83xx_wdt_driver = {
.remove = __devexit_p(mpc83xx_wdt_remove), .remove = __devexit_p(mpc83xx_wdt_remove),
.driver = { .driver = {
.name = "mpc83xx_wdt", .name = "mpc83xx_wdt",
.owner = THIS_MODULE,
}, },
}; };
...@@ -226,3 +227,4 @@ MODULE_AUTHOR("Dave Updegraff, Kumar Gala"); ...@@ -226,3 +227,4 @@ MODULE_AUTHOR("Dave Updegraff, Kumar Gala");
MODULE_DESCRIPTION("Driver for watchdog timer in MPC83xx uProcessor"); MODULE_DESCRIPTION("Driver for watchdog timer in MPC83xx uProcessor");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR); MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR);
MODULE_ALIAS("platform:mpc83xx_wdt");
...@@ -392,6 +392,9 @@ static int __devexit mpcore_wdt_remove(struct platform_device *dev) ...@@ -392,6 +392,9 @@ static int __devexit mpcore_wdt_remove(struct platform_device *dev)
return 0; return 0;
} }
/* work with hotplug and coldplug */
MODULE_ALIAS("platform:mpcore_wdt");
static struct platform_driver mpcore_wdt_driver = { static struct platform_driver mpcore_wdt_driver = {
.probe = mpcore_wdt_probe, .probe = mpcore_wdt_probe,
.remove = __devexit_p(mpcore_wdt_remove), .remove = __devexit_p(mpcore_wdt_remove),
......
...@@ -243,6 +243,7 @@ static struct platform_driver mtx1_wdt = { ...@@ -243,6 +243,7 @@ static struct platform_driver mtx1_wdt = {
.probe = mtx1_wdt_probe, .probe = mtx1_wdt_probe,
.remove = mtx1_wdt_remove, .remove = mtx1_wdt_remove,
.driver.name = "mtx1-wdt", .driver.name = "mtx1-wdt",
.driver.owner = THIS_MODULE,
}; };
static int __init mtx1_wdt_init(void) static int __init mtx1_wdt_init(void)
...@@ -262,3 +263,4 @@ MODULE_AUTHOR("Michael Stickel, Florian Fainelli"); ...@@ -262,3 +263,4 @@ MODULE_AUTHOR("Michael Stickel, Florian Fainelli");
MODULE_DESCRIPTION("Driver for the MTX-1 watchdog"); MODULE_DESCRIPTION("Driver for the MTX-1 watchdog");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR); MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR);
MODULE_ALIAS("platform:mtx1-wdt");
...@@ -324,3 +324,4 @@ MODULE_AUTHOR("James Chapman <jchapman@katalix.com>"); ...@@ -324,3 +324,4 @@ MODULE_AUTHOR("James Chapman <jchapman@katalix.com>");
MODULE_DESCRIPTION("MV64x60 watchdog driver"); MODULE_DESCRIPTION("MV64x60 watchdog driver");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR); MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR);
MODULE_ALIAS("platform:" MV64x60_WDT_NAME);
...@@ -387,3 +387,4 @@ module_exit(omap_wdt_exit); ...@@ -387,3 +387,4 @@ module_exit(omap_wdt_exit);
MODULE_AUTHOR("George G. Davis"); MODULE_AUTHOR("George G. Davis");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR); MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR);
MODULE_ALIAS("platform:omap_wdt");
...@@ -321,6 +321,7 @@ static int pnx4008_wdt_remove(struct platform_device *pdev) ...@@ -321,6 +321,7 @@ static int pnx4008_wdt_remove(struct platform_device *pdev)
static struct platform_driver platform_wdt_driver = { static struct platform_driver platform_wdt_driver = {
.driver = { .driver = {
.name = "watchdog", .name = "watchdog",
.owner = THIS_MODULE,
}, },
.probe = pnx4008_wdt_probe, .probe = pnx4008_wdt_probe,
.remove = pnx4008_wdt_remove, .remove = pnx4008_wdt_remove,
...@@ -354,3 +355,4 @@ MODULE_PARM_DESC(nowayout, ...@@ -354,3 +355,4 @@ MODULE_PARM_DESC(nowayout,
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR); MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR);
MODULE_ALIAS("platform:watchdog");
...@@ -561,3 +561,4 @@ MODULE_AUTHOR("Ben Dooks <ben@simtec.co.uk>, " ...@@ -561,3 +561,4 @@ MODULE_AUTHOR("Ben Dooks <ben@simtec.co.uk>, "
MODULE_DESCRIPTION("S3C2410 Watchdog Device Driver"); MODULE_DESCRIPTION("S3C2410 Watchdog Device Driver");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR); MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR);
MODULE_ALIAS("platform:s3c2410-wdt");
...@@ -274,3 +274,4 @@ module_exit(watchdog_exit); ...@@ -274,3 +274,4 @@ module_exit(watchdog_exit);
MODULE_DESCRIPTION("TXx9 Watchdog Driver"); MODULE_DESCRIPTION("TXx9 Watchdog Driver");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR); MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR);
MODULE_ALIAS("platform:txx9wdt");
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册