提交 41d867c9 编写于 作者: K Kay Sievers 提交者: David Woodhouse

[MTD] [MAPS] fix platform driver hotplug/coldplug

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

NOTE oddness with physmap ...  it's a legacy driver in some configs, which
means it can't always support hotplugging.  (Not that most of these mapping
drivers would often be used as modules...)

[dbrownell@users.sourceforge.net: bugfix, more drivers, registration fixes]
Signed-off-by: NKay Sievers <kay.sievers@vrfy.org>
Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NDavid Woodhouse <dwmw2@infradead.org>
上级 c27e9b80
...@@ -223,3 +223,4 @@ module_exit(bast_flash_exit); ...@@ -223,3 +223,4 @@ module_exit(bast_flash_exit);
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
MODULE_AUTHOR("Ben Dooks <ben@simtec.co.uk>"); MODULE_AUTHOR("Ben Dooks <ben@simtec.co.uk>");
MODULE_DESCRIPTION("BAST MTD Map driver"); MODULE_DESCRIPTION("BAST MTD Map driver");
MODULE_ALIAS("platform:bast-nor");
...@@ -190,6 +190,7 @@ static struct platform_driver armflash_driver = { ...@@ -190,6 +190,7 @@ static struct platform_driver armflash_driver = {
.remove = armflash_remove, .remove = armflash_remove,
.driver = { .driver = {
.name = "armflash", .name = "armflash",
.owner = THIS_MODULE,
}, },
}; };
...@@ -209,3 +210,4 @@ module_exit(armflash_exit); ...@@ -209,3 +210,4 @@ module_exit(armflash_exit);
MODULE_AUTHOR("ARM Ltd"); MODULE_AUTHOR("ARM Ltd");
MODULE_DESCRIPTION("ARM Integrator CFI map driver"); MODULE_DESCRIPTION("ARM Integrator CFI map driver");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
MODULE_ALIAS("platform:armflash");
...@@ -253,6 +253,7 @@ static struct platform_driver ixp2000_flash_driver = { ...@@ -253,6 +253,7 @@ static struct platform_driver ixp2000_flash_driver = {
.remove = ixp2000_flash_remove, .remove = ixp2000_flash_remove,
.driver = { .driver = {
.name = "IXP2000-Flash", .name = "IXP2000-Flash",
.owner = THIS_MODULE,
}, },
}; };
...@@ -270,4 +271,4 @@ module_init(ixp2000_flash_init); ...@@ -270,4 +271,4 @@ module_init(ixp2000_flash_init);
module_exit(ixp2000_flash_exit); module_exit(ixp2000_flash_exit);
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
MODULE_AUTHOR("Deepak Saxena <dsaxena@plexity.net>"); MODULE_AUTHOR("Deepak Saxena <dsaxena@plexity.net>");
MODULE_ALIAS("platform:IXP2000-Flash");
...@@ -275,6 +275,7 @@ static struct platform_driver ixp4xx_flash_driver = { ...@@ -275,6 +275,7 @@ static struct platform_driver ixp4xx_flash_driver = {
.remove = ixp4xx_flash_remove, .remove = ixp4xx_flash_remove,
.driver = { .driver = {
.name = "IXP4XX-Flash", .name = "IXP4XX-Flash",
.owner = THIS_MODULE,
}, },
}; };
...@@ -295,3 +296,4 @@ module_exit(ixp4xx_flash_exit); ...@@ -295,3 +296,4 @@ module_exit(ixp4xx_flash_exit);
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("MTD map driver for Intel IXP4xx systems"); MODULE_DESCRIPTION("MTD map driver for Intel IXP4xx systems");
MODULE_AUTHOR("Deepak Saxena"); MODULE_AUTHOR("Deepak Saxena");
MODULE_ALIAS("platform:IXP4XX-Flash");
...@@ -156,6 +156,7 @@ static struct platform_driver omapflash_driver = { ...@@ -156,6 +156,7 @@ static struct platform_driver omapflash_driver = {
.remove = __devexit_p(omapflash_remove), .remove = __devexit_p(omapflash_remove),
.driver = { .driver = {
.name = "omapflash", .name = "omapflash",
.owner = THIS_MODULE,
}, },
}; };
...@@ -174,4 +175,4 @@ module_exit(omapflash_exit); ...@@ -174,4 +175,4 @@ module_exit(omapflash_exit);
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("MTD NOR map driver for TI OMAP boards"); MODULE_DESCRIPTION("MTD NOR map driver for TI OMAP boards");
MODULE_ALIAS("platform:omapflash");
...@@ -242,6 +242,7 @@ static struct platform_driver physmap_flash_driver = { ...@@ -242,6 +242,7 @@ static struct platform_driver physmap_flash_driver = {
.shutdown = physmap_flash_shutdown, .shutdown = physmap_flash_shutdown,
.driver = { .driver = {
.name = "physmap-flash", .name = "physmap-flash",
.owner = THIS_MODULE,
}, },
}; };
...@@ -319,3 +320,10 @@ module_exit(physmap_exit); ...@@ -319,3 +320,10 @@ module_exit(physmap_exit);
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
MODULE_AUTHOR("David Woodhouse <dwmw2@infradead.org>"); MODULE_AUTHOR("David Woodhouse <dwmw2@infradead.org>");
MODULE_DESCRIPTION("Generic configurable MTD map driver"); MODULE_DESCRIPTION("Generic configurable MTD map driver");
/* legacy platform drivers can't hotplug or coldplg */
#ifndef PHYSMAP_COMPAT
/* work with hotplug and coldplug */
MODULE_ALIAS("platform:physmap-flash");
#endif
...@@ -251,6 +251,9 @@ static int platram_probe(struct platform_device *pdev) ...@@ -251,6 +251,9 @@ static int platram_probe(struct platform_device *pdev)
/* device driver info */ /* device driver info */
/* work with hotplug and coldplug */
MODULE_ALIAS("platform:mtd-ram");
static struct platform_driver platram_driver = { static struct platform_driver platram_driver = {
.probe = platram_probe, .probe = platram_probe,
.remove = platram_remove, .remove = platram_remove,
......
...@@ -456,6 +456,7 @@ static struct platform_driver sa1100_mtd_driver = { ...@@ -456,6 +456,7 @@ static struct platform_driver sa1100_mtd_driver = {
.shutdown = sa1100_mtd_shutdown, .shutdown = sa1100_mtd_shutdown,
.driver = { .driver = {
.name = "flash", .name = "flash",
.owner = THIS_MODULE,
}, },
}; };
...@@ -475,3 +476,4 @@ module_exit(sa1100_mtd_exit); ...@@ -475,3 +476,4 @@ module_exit(sa1100_mtd_exit);
MODULE_AUTHOR("Nicolas Pitre"); MODULE_AUTHOR("Nicolas Pitre");
MODULE_DESCRIPTION("SA1100 CFI map driver"); MODULE_DESCRIPTION("SA1100 CFI map driver");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
MODULE_ALIAS("platform:flash");
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册