diff options
author | Michael Büsch <mb@bu3sch.de> | 2009-02-11 18:01:59 +0000 |
---|---|---|
committer | Michael Büsch <mb@bu3sch.de> | 2009-02-11 18:01:59 +0000 |
commit | d64adbe7bb2d19ee23e813749afa3eec27937200 (patch) | |
tree | c3bb31e8fd381415029e77e942322e48ae4f82b0 /target/linux/generic-2.6 | |
parent | 60b157c3c83fbcd8e72ba08ffea4a1b8364dbb69 (diff) | |
download | master-31e0f0ae-d64adbe7bb2d19ee23e813749afa3eec27937200.tar.gz master-31e0f0ae-d64adbe7bb2d19ee23e813749afa3eec27937200.tar.bz2 master-31e0f0ae-d64adbe7bb2d19ee23e813749afa3eec27937200.zip |
Make spi-gpio hotplug capable, so we can initialize devices after boot.
SVN-Revision: 14475
Diffstat (limited to 'target/linux/generic-2.6')
-rw-r--r-- | target/linux/generic-2.6/patches-2.6.28/920-01-hotpluggable-spi-gpio.patch | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/target/linux/generic-2.6/patches-2.6.28/920-01-hotpluggable-spi-gpio.patch b/target/linux/generic-2.6/patches-2.6.28/920-01-hotpluggable-spi-gpio.patch new file mode 100644 index 0000000000..1b7c11db10 --- /dev/null +++ b/target/linux/generic-2.6/patches-2.6.28/920-01-hotpluggable-spi-gpio.patch @@ -0,0 +1,62 @@ +Fix spi-gpio for hotplug. + +--mb + + + +Index: linux-2.6.28.2/drivers/spi/spi_gpio.c +=================================================================== +--- linux-2.6.28.2.orig/drivers/spi/spi_gpio.c 2009-02-11 17:58:42.000000000 +0100 ++++ linux-2.6.28.2/drivers/spi/spi_gpio.c 2009-02-11 18:48:23.000000000 +0100 +@@ -213,7 +213,7 @@ static void spi_gpio_cleanup(struct spi_ + spi_bitbang_cleanup(spi); + } + +-static int __init spi_gpio_alloc(unsigned pin, const char *label, bool is_in) ++static int __devinit spi_gpio_alloc(unsigned pin, const char *label, bool is_in) + { + int value; + +@@ -227,7 +227,7 @@ static int __init spi_gpio_alloc(unsigne + return value; + } + +-static int __init ++static int __devinit + spi_gpio_request(struct spi_gpio_platform_data *pdata, const char *label) + { + int value; +@@ -256,7 +256,7 @@ done: + return value; + } + +-static int __init spi_gpio_probe(struct platform_device *pdev) ++static int __devinit spi_gpio_probe(struct platform_device *pdev) + { + int status; + struct spi_master *master; +@@ -312,7 +312,7 @@ gpio_free: + return status; + } + +-static int __exit spi_gpio_remove(struct platform_device *pdev) ++static int __devexit spi_gpio_remove(struct platform_device *pdev) + { + struct spi_gpio *spi_gpio; + struct spi_gpio_platform_data *pdata; +@@ -339,12 +339,13 @@ MODULE_ALIAS("platform:" DRIVER_NAME); + static struct platform_driver spi_gpio_driver = { + .driver.name = DRIVER_NAME, + .driver.owner = THIS_MODULE, +- .remove = __exit_p(spi_gpio_remove), ++ .probe = spi_gpio_probe, ++ .remove = __devexit_p(spi_gpio_remove), + }; + + static int __init spi_gpio_init(void) + { +- return platform_driver_probe(&spi_gpio_driver, spi_gpio_probe); ++ return platform_driver_register(&spi_gpio_driver); + } + module_init(spi_gpio_init); + |