+ spi-driver-hotplug-coldplug-fixes.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     SPI driver hotplug/coldplug fixes
has been added to the -mm tree.  Its filename is
     spi-driver-hotplug-coldplug-fixes.patch

*** Remember to use Documentation/SubmitChecklist when testing your code ***

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: SPI driver hotplug/coldplug fixes
From: David Brownell <david-b@xxxxxxxxxxx>

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@xxxxxxxxxxxxxxxxxxxxx>
Cc: Jean Delvare <khali@xxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 drivers/spi/spi_bfin5xx.c      |    3 ++-
 drivers/spi/spi_imx.c          |    2 +-
 drivers/spi/spi_mpc83xx.c      |    1 +
 drivers/spi/spi_s3c24xx.c      |    1 +
 drivers/spi/spi_s3c24xx_gpio.c |    2 +-
 drivers/spi/spi_txx9.c         |    1 +
 drivers/spi/xilinx_spi.c       |    2 +-
 7 files changed, 8 insertions(+), 4 deletions(-)

diff -puN drivers/spi/spi_bfin5xx.c~spi-driver-hotplug-coldplug-fixes drivers/spi/spi_bfin5xx.c
--- a/drivers/spi/spi_bfin5xx.c~spi-driver-hotplug-coldplug-fixes
+++ a/drivers/spi/spi_bfin5xx.c
@@ -1303,8 +1303,9 @@ static int bfin5xx_spi_resume(struct pla
 #define bfin5xx_spi_resume NULL
 #endif				/* CONFIG_PM */
 
+MODULE_ALIAS("bfin-spi-master");	/* for platform bus hotplug */
 static struct platform_driver bfin5xx_spi_driver = {
-	.driver 	= {
+	.driver	= {
 		.name	= "bfin-spi-master",
 		.owner	= THIS_MODULE,
 	},
diff -puN drivers/spi/spi_imx.c~spi-driver-hotplug-coldplug-fixes drivers/spi/spi_imx.c
--- a/drivers/spi/spi_imx.c~spi-driver-hotplug-coldplug-fixes
+++ a/drivers/spi/spi_imx.c
@@ -1735,7 +1735,7 @@ static int spi_imx_resume(struct platfor
 
 static struct platform_driver driver = {
 	.driver = {
-		.name = "imx-spi",
+		.name = "spi_imx",
 		.bus = &platform_bus_type,
 		.owner = THIS_MODULE,
 	},
diff -puN drivers/spi/spi_mpc83xx.c~spi-driver-hotplug-coldplug-fixes drivers/spi/spi_mpc83xx.c
--- a/drivers/spi/spi_mpc83xx.c~spi-driver-hotplug-coldplug-fixes
+++ a/drivers/spi/spi_mpc83xx.c
@@ -530,6 +530,7 @@ static int __devexit mpc83xx_spi_remove(
 	return 0;
 }
 
+MODULE_ALIAS("mpc83xx_spi");			/* for platform bus hotplug */
 static struct platform_driver mpc83xx_spi_driver = {
 	.probe = mpc83xx_spi_probe,
 	.remove = __devexit_p(mpc83xx_spi_remove),
diff -puN drivers/spi/spi_s3c24xx.c~spi-driver-hotplug-coldplug-fixes drivers/spi/spi_s3c24xx.c
--- a/drivers/spi/spi_s3c24xx.c~spi-driver-hotplug-coldplug-fixes
+++ a/drivers/spi/spi_s3c24xx.c
@@ -427,6 +427,7 @@ static int s3c24xx_spi_resume(struct pla
 #define s3c24xx_spi_resume  NULL
 #endif
 
+MODULE_ALIAS("s3c2410_spi");			/* for platform bus hotplug */
 static struct platform_driver s3c24xx_spidrv = {
 	.probe		= s3c24xx_spi_probe,
 	.remove		= s3c24xx_spi_remove,
diff -puN drivers/spi/spi_s3c24xx_gpio.c~spi-driver-hotplug-coldplug-fixes drivers/spi/spi_s3c24xx_gpio.c
--- a/drivers/spi/spi_s3c24xx_gpio.c~spi-driver-hotplug-coldplug-fixes
+++ a/drivers/spi/spi_s3c24xx_gpio.c
@@ -180,7 +180,7 @@ static struct platform_driver s3c2410_sp
         .suspend	= s3c2410_spigpio_suspend,
         .resume		= s3c2410_spigpio_resume,
         .driver		= {
-		.name	= "s3c24xx-spi-gpio",
+		.name	= "spi_s3c24xx_gpio",
 		.owner	= THIS_MODULE,
         },
 };
diff -puN drivers/spi/spi_txx9.c~spi-driver-hotplug-coldplug-fixes drivers/spi/spi_txx9.c
--- a/drivers/spi/spi_txx9.c~spi-driver-hotplug-coldplug-fixes
+++ a/drivers/spi/spi_txx9.c
@@ -450,6 +450,7 @@ static int __exit txx9spi_remove(struct 
 	return 0;
 }
 
+MODULE_ALIAS("txx9spi");			/* for platform bus hotplug */
 static struct platform_driver txx9spi_driver = {
 	.remove = __exit_p(txx9spi_remove),
 	.driver = {
diff -puN drivers/spi/xilinx_spi.c~spi-driver-hotplug-coldplug-fixes drivers/spi/xilinx_spi.c
--- a/drivers/spi/xilinx_spi.c~spi-driver-hotplug-coldplug-fixes
+++ a/drivers/spi/xilinx_spi.c
@@ -21,7 +21,7 @@
 
 #include <syslib/virtex_devices.h>
 
-#define XILINX_SPI_NAME "xspi"
+#define XILINX_SPI_NAME "xilinx_spi"
 
 /* Register definitions as per "OPB Serial Peripheral Interface (SPI) (v1.00e)
  * Product Specification", DS464
_

Patches currently in -mm which might be from david-b@xxxxxxxxxxx are

origin.patch
correct-name-for-rtc-m41t80.patch
rtc-max6902-minor-fixes.patch
spi-driver-hotplug-coldplug-fixes.patch
mips-add-gpio-support-to-the-bcm947xx-platform.patch
mips-gpio-led-driver-for-the-wgt634u-machine.patch
git-mmc.patch
git-mtd.patch
ohci-fix-oddball-gcc-warning.patch
drivers-pmc-msp71xx-gpio-char-driver.patch
driver-for-the-atmel-on-chip-ssc-on-at32ap-and-at91.patch
clean-up-duplicate-includes-in-drivers-spi.patch
rtc-periodic-irq-fix.patch
rtc_irq_set_freq-requires-power-of-two-and-associated-kerneldoc.patch
add-missing-newlines-to-some-uses-of-dev_level-messages.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux