]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[MTD] [MAPS] fix platform driver hotplug/coldplug
authorKay Sievers <kay.sievers@vrfy.org>
Fri, 18 Apr 2008 20:44:26 +0000 (13:44 -0700)
committerDavid Woodhouse <dwmw2@infradead.org>
Tue, 22 Apr 2008 13:14:26 +0000 (14:14 +0100)
Since 43cc71eed1250755986da4c0f9898f9a635cb3bf, 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: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
drivers/mtd/maps/bast-flash.c
drivers/mtd/maps/integrator-flash.c
drivers/mtd/maps/ixp2000.c
drivers/mtd/maps/ixp4xx.c
drivers/mtd/maps/omap_nor.c
drivers/mtd/maps/physmap.c
drivers/mtd/maps/plat-ram.c
drivers/mtd/maps/sa1100-flash.c

index 59fea2a8980493ac4c15d2f7047f6934eb314bec..1f492062f8ca7fb18f62f7fbf35ee3ce54a6e758 100644 (file)
@@ -223,3 +223,4 @@ module_exit(bast_flash_exit);
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR("Ben Dooks <ben@simtec.co.uk>");
 MODULE_DESCRIPTION("BAST MTD Map driver");
+MODULE_ALIAS("platform:bast-nor");
index 6946d802e6f67e1c03a577e01fa345d2b794715b..325c8880c4379393b4266c0849ee0bfc85488344 100644 (file)
@@ -190,6 +190,7 @@ static struct platform_driver armflash_driver = {
        .remove         = armflash_remove,
        .driver         = {
                .name   = "armflash",
+               .owner  = THIS_MODULE,
        },
 };
 
@@ -209,3 +210,4 @@ module_exit(armflash_exit);
 MODULE_AUTHOR("ARM Ltd");
 MODULE_DESCRIPTION("ARM Integrator CFI map driver");
 MODULE_LICENSE("GPL");
+MODULE_ALIAS("platform:armflash");
index c26488a1793abd769ede3be3083afb5562c98925..c8396b8574c4624debf97d0846ab0a88dd07867f 100644 (file)
@@ -253,6 +253,7 @@ static struct platform_driver ixp2000_flash_driver = {
        .remove         = ixp2000_flash_remove,
        .driver         = {
                .name   = "IXP2000-Flash",
+               .owner  = THIS_MODULE,
        },
 };
 
@@ -270,4 +271,4 @@ module_init(ixp2000_flash_init);
 module_exit(ixp2000_flash_exit);
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR("Deepak Saxena <dsaxena@plexity.net>");
-
+MODULE_ALIAS("platform:IXP2000-Flash");
index 7a828e3e6446d7f9254f083d3b02bb2e9e02e9e0..01f19a4714b5b7383506d929208b0637a6cc7c0f 100644 (file)
@@ -275,6 +275,7 @@ static struct platform_driver ixp4xx_flash_driver = {
        .remove         = ixp4xx_flash_remove,
        .driver         = {
                .name   = "IXP4XX-Flash",
+               .owner  = THIS_MODULE,
        },
 };
 
@@ -295,3 +296,4 @@ module_exit(ixp4xx_flash_exit);
 MODULE_LICENSE("GPL");
 MODULE_DESCRIPTION("MTD map driver for Intel IXP4xx systems");
 MODULE_AUTHOR("Deepak Saxena");
+MODULE_ALIAS("platform:IXP4XX-Flash");
index e8d9ae535673d68d04b547f029dbdadefd6b3e58..676248ff4a75ae8e11d3d35fb0acf7b4227c3a24 100644 (file)
@@ -156,6 +156,7 @@ static struct platform_driver omapflash_driver = {
        .remove = __devexit_p(omapflash_remove),
        .driver = {
                .name   = "omapflash",
+               .owner  = THIS_MODULE,
        },
 };
 
@@ -174,4 +175,4 @@ module_exit(omapflash_exit);
 
 MODULE_LICENSE("GPL");
 MODULE_DESCRIPTION("MTD NOR map driver for TI OMAP boards");
-
+MODULE_ALIAS("platform:omapflash");
index bc4649a17b9d022d44bab69ebb0de575edb9bdd3..183255fcfdcbd288dc38e697b6a6ed8ff3be3321 100644 (file)
@@ -242,6 +242,7 @@ static struct platform_driver physmap_flash_driver = {
        .shutdown       = physmap_flash_shutdown,
        .driver         = {
                .name   = "physmap-flash",
+               .owner  = THIS_MODULE,
        },
 };
 
@@ -319,3 +320,10 @@ module_exit(physmap_exit);
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR("David Woodhouse <dwmw2@infradead.org>");
 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
+
index 894c0b27128982fc5d52a6fc79a7b32efecc320f..7160e0eb09af19fc3aeabb6448881c1041d24cb7 100644 (file)
@@ -251,6 +251,9 @@ static int platram_probe(struct platform_device *pdev)
 
 /* device driver info */
 
+/* work with hotplug and coldplug */
+MODULE_ALIAS("platform:mtd-ram");
+
 static struct platform_driver platram_driver = {
        .probe          = platram_probe,
        .remove         = platram_remove,
index f904e6bd02e05856f220bea1fe89afb0566b60c6..c7d5a52a2d559e997c62ba629bdf38f28f72e2c1 100644 (file)
@@ -456,6 +456,7 @@ static struct platform_driver sa1100_mtd_driver = {
        .shutdown       = sa1100_mtd_shutdown,
        .driver         = {
                .name   = "flash",
+               .owner  = THIS_MODULE,
        },
 };
 
@@ -475,3 +476,4 @@ module_exit(sa1100_mtd_exit);
 MODULE_AUTHOR("Nicolas Pitre");
 MODULE_DESCRIPTION("SA1100 CFI map driver");
 MODULE_LICENSE("GPL");
+MODULE_ALIAS("platform:flash");