aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/spi
diff options
context:
space:
mode:
authorDavid Brownell <david-b@pacbell.net>2007-08-31 02:56:24 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-08-31 04:42:22 -0400
commitfc3ba9525b50ea0d1670357ece21ebedcee507ae (patch)
tree857f3817737c800e8d45fbb129993a4b5dfbd3bf /drivers/spi
parentf2ab6d8889422c1f5354f014e8bef337b1d1bade (diff)
SPI driver hotplug/coldplug fixes
Update various SPI drivers so they properly support - coldplug through "modprobe $(cat /sys/devices/.../modalias)" - hotplug through "modprobe $(MODALIAS)" The basic rule for platform, SPI, and (new style) I2C drivers is just to make sure that modprobing the driver name works. In this case, all the relevant drivers are platform drivers, and this patch either (a) Changes the driver name, if no in-tree code would break; this is simpler and thus preferable in the long term. (b) Adds MODULE_ALIAS directives, when in-tree platforms declare devices using the current driver name; less desirable. Most systems will link SPI controller drivers statically, but there's no point in being needlessly broken. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Cc: Jean Delvare <khali@linux-fr.org> Acked-by: Andrei Konovalov <akonovalov@ru.mvista.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/spi')
-rw-r--r--drivers/spi/spi_bfin5xx.c3
-rw-r--r--drivers/spi/spi_imx.c2
-rw-r--r--drivers/spi/spi_mpc83xx.c1
-rw-r--r--drivers/spi/spi_s3c24xx.c1
-rw-r--r--drivers/spi/spi_s3c24xx_gpio.c2
-rw-r--r--drivers/spi/spi_txx9.c1
-rw-r--r--drivers/spi/xilinx_spi.c2
7 files changed, 8 insertions, 4 deletions
diff --git a/drivers/spi/spi_bfin5xx.c b/drivers/spi/spi_bfin5xx.c
index 48587c27050d..f540ed77a102 100644
--- a/drivers/spi/spi_bfin5xx.c
+++ b/drivers/spi/spi_bfin5xx.c
@@ -1303,8 +1303,9 @@ static int bfin5xx_spi_resume(struct platform_device *pdev)
1303#define bfin5xx_spi_resume NULL 1303#define bfin5xx_spi_resume NULL
1304#endif /* CONFIG_PM */ 1304#endif /* CONFIG_PM */
1305 1305
1306MODULE_ALIAS("bfin-spi-master"); /* for platform bus hotplug */
1306static struct platform_driver bfin5xx_spi_driver = { 1307static struct platform_driver bfin5xx_spi_driver = {
1307 .driver = { 1308 .driver = {
1308 .name = "bfin-spi-master", 1309 .name = "bfin-spi-master",
1309 .owner = THIS_MODULE, 1310 .owner = THIS_MODULE,
1310 }, 1311 },
diff --git a/drivers/spi/spi_imx.c b/drivers/spi/spi_imx.c
index aee9ad6f633c..bd9177f51de9 100644
--- a/drivers/spi/spi_imx.c
+++ b/drivers/spi/spi_imx.c
@@ -1735,7 +1735,7 @@ static int spi_imx_resume(struct platform_device *pdev)
1735 1735
1736static struct platform_driver driver = { 1736static struct platform_driver driver = {
1737 .driver = { 1737 .driver = {
1738 .name = "imx-spi", 1738 .name = "spi_imx",
1739 .bus = &platform_bus_type, 1739 .bus = &platform_bus_type,
1740 .owner = THIS_MODULE, 1740 .owner = THIS_MODULE,
1741 }, 1741 },
diff --git a/drivers/spi/spi_mpc83xx.c b/drivers/spi/spi_mpc83xx.c
index 2adf856e44c2..fcbf1b8a5264 100644
--- a/drivers/spi/spi_mpc83xx.c
+++ b/drivers/spi/spi_mpc83xx.c
@@ -530,6 +530,7 @@ static int __devexit mpc83xx_spi_remove(struct platform_device *dev)
530 return 0; 530 return 0;
531} 531}
532 532
533MODULE_ALIAS("mpc83xx_spi"); /* for platform bus hotplug */
533static struct platform_driver mpc83xx_spi_driver = { 534static struct platform_driver mpc83xx_spi_driver = {
534 .probe = mpc83xx_spi_probe, 535 .probe = mpc83xx_spi_probe,
535 .remove = __devexit_p(mpc83xx_spi_remove), 536 .remove = __devexit_p(mpc83xx_spi_remove),
diff --git a/drivers/spi/spi_s3c24xx.c b/drivers/spi/spi_s3c24xx.c
index 5cf48123e0ef..e9b683f7d7b3 100644
--- a/drivers/spi/spi_s3c24xx.c
+++ b/drivers/spi/spi_s3c24xx.c
@@ -427,6 +427,7 @@ static int s3c24xx_spi_resume(struct platform_device *pdev)
427#define s3c24xx_spi_resume NULL 427#define s3c24xx_spi_resume NULL
428#endif 428#endif
429 429
430MODULE_ALIAS("s3c2410_spi"); /* for platform bus hotplug */
430static struct platform_driver s3c24xx_spidrv = { 431static struct platform_driver s3c24xx_spidrv = {
431 .probe = s3c24xx_spi_probe, 432 .probe = s3c24xx_spi_probe,
432 .remove = s3c24xx_spi_remove, 433 .remove = s3c24xx_spi_remove,
diff --git a/drivers/spi/spi_s3c24xx_gpio.c b/drivers/spi/spi_s3c24xx_gpio.c
index 611ac22b7cdc..0fa25e2e80fe 100644
--- a/drivers/spi/spi_s3c24xx_gpio.c
+++ b/drivers/spi/spi_s3c24xx_gpio.c
@@ -180,7 +180,7 @@ static struct platform_driver s3c2410_spigpio_drv = {
180 .suspend = s3c2410_spigpio_suspend, 180 .suspend = s3c2410_spigpio_suspend,
181 .resume = s3c2410_spigpio_resume, 181 .resume = s3c2410_spigpio_resume,
182 .driver = { 182 .driver = {
183 .name = "s3c24xx-spi-gpio", 183 .name = "spi_s3c24xx_gpio",
184 .owner = THIS_MODULE, 184 .owner = THIS_MODULE,
185 }, 185 },
186}; 186};
diff --git a/drivers/spi/spi_txx9.c b/drivers/spi/spi_txx9.c
index 08e981c40646..f6c3677035b0 100644
--- a/drivers/spi/spi_txx9.c
+++ b/drivers/spi/spi_txx9.c
@@ -450,6 +450,7 @@ static int __exit txx9spi_remove(struct platform_device *dev)
450 return 0; 450 return 0;
451} 451}
452 452
453MODULE_ALIAS("txx9spi"); /* for platform bus hotplug */
453static struct platform_driver txx9spi_driver = { 454static struct platform_driver txx9spi_driver = {
454 .remove = __exit_p(txx9spi_remove), 455 .remove = __exit_p(txx9spi_remove),
455 .driver = { 456 .driver = {
diff --git a/drivers/spi/xilinx_spi.c b/drivers/spi/xilinx_spi.c
index f0bf9a68e96b..5d04f520c123 100644
--- a/drivers/spi/xilinx_spi.c
+++ b/drivers/spi/xilinx_spi.c
@@ -21,7 +21,7 @@
21 21
22#include <syslib/virtex_devices.h> 22#include <syslib/virtex_devices.h>
23 23
24#define XILINX_SPI_NAME "xspi" 24#define XILINX_SPI_NAME "xilinx_spi"
25 25
26/* Register definitions as per "OPB Serial Peripheral Interface (SPI) (v1.00e) 26/* Register definitions as per "OPB Serial Peripheral Interface (SPI) (v1.00e)
27 * Product Specification", DS464 27 * Product Specification", DS464