]> err.no Git - linux-2.6/commitdiff
ATA/IDE: fix platform driver hotplug/coldplug
authorKay Sievers <kay.sievers@vrfy.org>
Fri, 18 Apr 2008 20:41:57 +0000 (13:41 -0700)
committerJeff Garzik <jgarzik@redhat.com>
Fri, 25 Apr 2008 04:45:04 +0000 (00:45 -0400)
Since 43cc71eed1250755986da4c0f9898f9a635cb3bf, the platform modalias
is prefixed with "platform:".  Add MODULE_ALIAS() to the hotpluggable
ATA and IDE platform drivers, to re-enable auto loading.

NOTE: both ata/pata_platform.c and ide/legacy/ide_platform.c claim
to provide "the" platform_pata driver, and there's no build-time
mutual exclusion mechanism.  This means that configs which enable
both drivers will make some trouble when hotplugging...

[dbrownell@users.sourceforge.net: more drivers, registration fixes]
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: Tejun Heo <htejun@gmail.com>
Acked-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
drivers/ata/pata_at32.c
drivers/ata/pata_bf54x.c
drivers/ata/pata_ixp4xx_cf.c
drivers/ata/pata_platform.c
drivers/ata/pata_rb500_cf.c
drivers/ide/arm/palm_bk3710.c
drivers/ide/legacy/ide_platform.c

index 3e8651d78952c6c1bd31b066fe94037685d4716e..5e104385d6a374336d529dad852087e19df78770 100644 (file)
@@ -381,6 +381,9 @@ static int __exit pata_at32_remove(struct platform_device *pdev)
        return 0;
 }
 
+/* work with hotplug and coldplug */
+MODULE_ALIAS("platform:at32_ide");
+
 static struct platform_driver pata_at32_driver = {
        .remove        = __exit_p(pata_at32_remove),
        .driver        = {
index 0a5ad98635b1c0005bd3847055b241ff30d80409..e4cf73c4b70baf51582a28d6f663640ae0d41822 100644 (file)
@@ -1601,3 +1601,4 @@ MODULE_AUTHOR("Sonic Zhang <sonic.zhang@analog.com>");
 MODULE_DESCRIPTION("PATA driver for blackfin 54x ATAPI controller");
 MODULE_LICENSE("GPL");
 MODULE_VERSION(DRV_VERSION);
+MODULE_ALIAS("platform:" DRV_NAME);
index 8a175f23b907d7a4cb022617632dd387dd209d7a..de8d186f5abf01ba6c2e6dccfd0477e0e9fb4619 100644 (file)
@@ -221,6 +221,7 @@ MODULE_AUTHOR("Alessandro Zummo <a.zummo@towertech.it>");
 MODULE_DESCRIPTION("low-level driver for ixp4xx Compact Flash PATA");
 MODULE_LICENSE("GPL");
 MODULE_VERSION(DRV_VERSION);
+MODULE_ALIAS("platform:" DRV_NAME);
 
 module_init(ixp4xx_pata_init);
 module_exit(ixp4xx_pata_exit);
index 6527c56c34a3fd84537385c39a4c85a91b1f3330..8f65ad61b8af372f8e6263fb55ec85c79df5f801 100644 (file)
@@ -277,3 +277,4 @@ MODULE_AUTHOR("Paul Mundt");
 MODULE_DESCRIPTION("low-level driver for platform device ATA");
 MODULE_LICENSE("GPL");
 MODULE_VERSION(DRV_VERSION);
+MODULE_ALIAS("platform:" DRV_NAME);
index 800ae4601f44b7eec6a0b7b20e55bc86a5c01707..4345174aaeecc7fd8038bf45dc280aa73830701e 100644 (file)
@@ -239,6 +239,9 @@ static __devexit int rb500_pata_driver_remove(struct platform_device *pdev)
        return 0;
 }
 
+/* work with hotplug and coldplug */
+MODULE_ALIAS("platform:" DRV_NAME);
+
 static struct platform_driver rb500_pata_platform_driver = {
        .probe          = rb500_pata_driver_probe,
        .remove         = __devexit_p(rb500_pata_driver_remove),
index 474162cdf66599ab8b581e37def8f89a0668ff40..420fcb78a7cd15215b7b476b7cd57b378c71308f 100644 (file)
@@ -409,9 +409,13 @@ out:
        return -ENODEV;
 }
 
+/* work with hotplug and coldplug */
+MODULE_ALIAS("platform:palm_bk3710");
+
 static struct platform_driver platform_bk_driver = {
        .driver = {
                .name = "palm_bk3710",
+               .owner = THIS_MODULE,
        },
        .probe = palm_bk3710_probe,
        .remove = NULL,
index 249651e2da424f2b9b6ccb409b6b6bd046b46ccc..361b1bb544bf442ccf136aadd316839d4ae24f4e 100644 (file)
@@ -130,6 +130,7 @@ static int __devexit plat_ide_remove(struct platform_device *pdev)
 static struct platform_driver platform_ide_driver = {
        .driver = {
                .name = "pata_platform",
+               .owner = THIS_MODULE,
        },
        .probe = plat_ide_probe,
        .remove = __devexit_p(plat_ide_remove),
@@ -147,6 +148,7 @@ static void __exit platform_ide_exit(void)
 
 MODULE_DESCRIPTION("Platform IDE driver");
 MODULE_LICENSE("GPL");
+MODULE_ALIAS("platform:pata_platform");
 
 module_init(platform_ide_init);
 module_exit(platform_ide_exit);