* [patch 1/2] ATA/IDE: fix platform driver hotplug/coldplug
@ 2008-04-18 20:41 akpm
2008-04-25 4:47 ` Jeff Garzik
0 siblings, 1 reply; 2+ messages in thread
From: akpm @ 2008-04-18 20:41 UTC (permalink / raw)
To: jeff; +Cc: bzolnier, linux-ide, akpm, kay.sievers, dbrownell, htejun
From: Kay Sievers <kay.sievers@vrfy.org>
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: Jeff Garzik <jeff@garzik.org>
Cc: Tejun Heo <htejun@gmail.com>
Acked-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
drivers/ata/pata_at32.c | 3 +++
drivers/ata/pata_bf54x.c | 1 +
drivers/ata/pata_ixp4xx_cf.c | 1 +
drivers/ata/pata_platform.c | 1 +
drivers/ata/pata_rb500_cf.c | 3 +++
drivers/ata/sata_mv.c | 2 +-
drivers/ide/arm/palm_bk3710.c | 4 ++++
drivers/ide/legacy/ide_platform.c | 2 ++
8 files changed, 16 insertions(+), 1 deletion(-)
diff -puN drivers/ata/pata_at32.c~ata-ide-fix-platform-driver-hotplug-coldplug drivers/ata/pata_at32.c
--- a/drivers/ata/pata_at32.c~ata-ide-fix-platform-driver-hotplug-coldplug
+++ a/drivers/ata/pata_at32.c
@@ -381,6 +381,9 @@ static int __exit pata_at32_remove(struc
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 = {
diff -puN drivers/ata/pata_bf54x.c~ata-ide-fix-platform-driver-hotplug-coldplug drivers/ata/pata_bf54x.c
--- a/drivers/ata/pata_bf54x.c~ata-ide-fix-platform-driver-hotplug-coldplug
+++ a/drivers/ata/pata_bf54x.c
@@ -1601,3 +1601,4 @@ MODULE_AUTHOR("Sonic Zhang <sonic.zhang@
MODULE_DESCRIPTION("PATA driver for blackfin 54x ATAPI controller");
MODULE_LICENSE("GPL");
MODULE_VERSION(DRV_VERSION);
+MODULE_ALIAS("platform:" DRV_NAME);
diff -puN drivers/ata/pata_ixp4xx_cf.c~ata-ide-fix-platform-driver-hotplug-coldplug drivers/ata/pata_ixp4xx_cf.c
--- a/drivers/ata/pata_ixp4xx_cf.c~ata-ide-fix-platform-driver-hotplug-coldplug
+++ a/drivers/ata/pata_ixp4xx_cf.c
@@ -221,6 +221,7 @@ MODULE_AUTHOR("Alessandro Zummo <a.zummo
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);
diff -puN drivers/ata/pata_platform.c~ata-ide-fix-platform-driver-hotplug-coldplug drivers/ata/pata_platform.c
--- a/drivers/ata/pata_platform.c~ata-ide-fix-platform-driver-hotplug-coldplug
+++ a/drivers/ata/pata_platform.c
@@ -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);
diff -puN drivers/ata/pata_rb500_cf.c~ata-ide-fix-platform-driver-hotplug-coldplug drivers/ata/pata_rb500_cf.c
--- a/drivers/ata/pata_rb500_cf.c~ata-ide-fix-platform-driver-hotplug-coldplug
+++ a/drivers/ata/pata_rb500_cf.c
@@ -239,6 +239,9 @@ static __devexit int rb500_pata_driver_r
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),
diff -puN drivers/ata/sata_mv.c~ata-ide-fix-platform-driver-hotplug-coldplug drivers/ata/sata_mv.c
--- a/drivers/ata/sata_mv.c~ata-ide-fix-platform-driver-hotplug-coldplug
+++ a/drivers/ata/sata_mv.c
@@ -3122,7 +3122,7 @@ MODULE_DESCRIPTION("SCSI low-level drive
MODULE_LICENSE("GPL");
MODULE_DEVICE_TABLE(pci, mv_pci_tbl);
MODULE_VERSION(DRV_VERSION);
-MODULE_ALIAS("platform:sata_mv");
+MODULE_ALIAS("platform:" DRV_NAME);
#ifdef CONFIG_PCI
module_param(msi, int, 0444);
diff -puN drivers/ide/arm/palm_bk3710.c~ata-ide-fix-platform-driver-hotplug-coldplug drivers/ide/arm/palm_bk3710.c
--- a/drivers/ide/arm/palm_bk3710.c~ata-ide-fix-platform-driver-hotplug-coldplug
+++ a/drivers/ide/arm/palm_bk3710.c
@@ -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,
diff -puN drivers/ide/legacy/ide_platform.c~ata-ide-fix-platform-driver-hotplug-coldplug drivers/ide/legacy/ide_platform.c
--- a/drivers/ide/legacy/ide_platform.c~ata-ide-fix-platform-driver-hotplug-coldplug
+++ a/drivers/ide/legacy/ide_platform.c
@@ -130,6 +130,7 @@ static int __devexit plat_ide_remove(str
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(voi
MODULE_DESCRIPTION("Platform IDE driver");
MODULE_LICENSE("GPL");
+MODULE_ALIAS("platform:pata_platform");
module_init(platform_ide_init);
module_exit(platform_ide_exit);
_
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [patch 1/2] ATA/IDE: fix platform driver hotplug/coldplug
2008-04-18 20:41 [patch 1/2] ATA/IDE: fix platform driver hotplug/coldplug akpm
@ 2008-04-25 4:47 ` Jeff Garzik
0 siblings, 0 replies; 2+ messages in thread
From: Jeff Garzik @ 2008-04-25 4:47 UTC (permalink / raw)
To: akpm; +Cc: bzolnier, linux-ide, kay.sievers, dbrownell, htejun
akpm@linux-foundation.org wrote:
> From: Kay Sievers <kay.sievers@vrfy.org>
>
> 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: Jeff Garzik <jeff@garzik.org>
> Cc: Tejun Heo <htejun@gmail.com>
> Acked-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> ---
>
> drivers/ata/pata_at32.c | 3 +++
> drivers/ata/pata_bf54x.c | 1 +
> drivers/ata/pata_ixp4xx_cf.c | 1 +
> drivers/ata/pata_platform.c | 1 +
> drivers/ata/pata_rb500_cf.c | 3 +++
> drivers/ata/sata_mv.c | 2 +-
> drivers/ide/arm/palm_bk3710.c | 4 ++++
> drivers/ide/legacy/ide_platform.c | 2 ++
> 8 files changed, 16 insertions(+), 1 deletion(-)
>
> diff -puN drivers/ata/pata_at32.c~ata-ide-fix-platform-driver-hotplug-coldplug drivers/ata/pata_at32.c
> --- a/drivers/ata/pata_at32.c~ata-ide-fix-platform-driver-hotplug-coldplug
> +++ a/drivers/ata/pata_at32.c
> @@ -381,6 +381,9 @@ static int __exit pata_at32_remove(struc
> 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 = {
> diff -puN drivers/ata/pata_bf54x.c~ata-ide-fix-platform-driver-hotplug-coldplug drivers/ata/pata_bf54x.c
> --- a/drivers/ata/pata_bf54x.c~ata-ide-fix-platform-driver-hotplug-coldplug
> +++ a/drivers/ata/pata_bf54x.c
> @@ -1601,3 +1601,4 @@ MODULE_AUTHOR("Sonic Zhang <sonic.zhang@
> MODULE_DESCRIPTION("PATA driver for blackfin 54x ATAPI controller");
> MODULE_LICENSE("GPL");
> MODULE_VERSION(DRV_VERSION);
> +MODULE_ALIAS("platform:" DRV_NAME);
> diff -puN drivers/ata/pata_ixp4xx_cf.c~ata-ide-fix-platform-driver-hotplug-coldplug drivers/ata/pata_ixp4xx_cf.c
> --- a/drivers/ata/pata_ixp4xx_cf.c~ata-ide-fix-platform-driver-hotplug-coldplug
> +++ a/drivers/ata/pata_ixp4xx_cf.c
> @@ -221,6 +221,7 @@ MODULE_AUTHOR("Alessandro Zummo <a.zummo
> 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);
> diff -puN drivers/ata/pata_platform.c~ata-ide-fix-platform-driver-hotplug-coldplug drivers/ata/pata_platform.c
> --- a/drivers/ata/pata_platform.c~ata-ide-fix-platform-driver-hotplug-coldplug
> +++ a/drivers/ata/pata_platform.c
> @@ -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);
> diff -puN drivers/ata/pata_rb500_cf.c~ata-ide-fix-platform-driver-hotplug-coldplug drivers/ata/pata_rb500_cf.c
> --- a/drivers/ata/pata_rb500_cf.c~ata-ide-fix-platform-driver-hotplug-coldplug
> +++ a/drivers/ata/pata_rb500_cf.c
> @@ -239,6 +239,9 @@ static __devexit int rb500_pata_driver_r
> 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),
> diff -puN drivers/ata/sata_mv.c~ata-ide-fix-platform-driver-hotplug-coldplug drivers/ata/sata_mv.c
> --- a/drivers/ata/sata_mv.c~ata-ide-fix-platform-driver-hotplug-coldplug
> +++ a/drivers/ata/sata_mv.c
> @@ -3122,7 +3122,7 @@ MODULE_DESCRIPTION("SCSI low-level drive
> MODULE_LICENSE("GPL");
> MODULE_DEVICE_TABLE(pci, mv_pci_tbl);
> MODULE_VERSION(DRV_VERSION);
> -MODULE_ALIAS("platform:sata_mv");
> +MODULE_ALIAS("platform:" DRV_NAME);
>
> #ifdef CONFIG_PCI
> module_param(msi, int, 0444);
> diff -puN drivers/ide/arm/palm_bk3710.c~ata-ide-fix-platform-driver-hotplug-coldplug drivers/ide/arm/palm_bk3710.c
> --- a/drivers/ide/arm/palm_bk3710.c~ata-ide-fix-platform-driver-hotplug-coldplug
> +++ a/drivers/ide/arm/palm_bk3710.c
> @@ -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,
> diff -puN drivers/ide/legacy/ide_platform.c~ata-ide-fix-platform-driver-hotplug-coldplug drivers/ide/legacy/ide_platform.c
> --- a/drivers/ide/legacy/ide_platform.c~ata-ide-fix-platform-driver-hotplug-coldplug
> +++ a/drivers/ide/legacy/ide_platform.c
> @@ -130,6 +130,7 @@ static int __devexit plat_ide_remove(str
> 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(voi
>
> MODULE_DESCRIPTION("Platform IDE driver");
> MODULE_LICENSE("GPL");
> +MODULE_ALIAS("platform:pata_platform");
>
> module_init(platform_ide_init);
> module_exit(platform_ide_exit);
applied
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-04-25 4:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-18 20:41 [patch 1/2] ATA/IDE: fix platform driver hotplug/coldplug akpm
2008-04-25 4:47 ` Jeff Garzik
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).