aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/generic-2.6/patches-2.6.29/920-01-hotpluggable-spi-gpio.patch
diff options
context:
space:
mode:
authorHamish Guthrie <hcg@openwrt.org>2009-05-28 10:00:48 +0000
committerHamish Guthrie <hcg@openwrt.org>2009-05-28 10:00:48 +0000
commit7adb67f18469e51cecb83a0c2efbf22494acb244 (patch)
treefe225b163b00d82bf2dfa88ec105309675690049 /target/linux/generic-2.6/patches-2.6.29/920-01-hotpluggable-spi-gpio.patch
parent52d975c359b8330e2844d3bb942588bd5afd73e6 (diff)
downloadupstream-7adb67f18469e51cecb83a0c2efbf22494acb244.tar.gz
upstream-7adb67f18469e51cecb83a0c2efbf22494acb244.tar.bz2
upstream-7adb67f18469e51cecb83a0c2efbf22494acb244.zip
revert 15922 - add back 2.6.29 kernel support
SVN-Revision: 16127
Diffstat (limited to 'target/linux/generic-2.6/patches-2.6.29/920-01-hotpluggable-spi-gpio.patch')
-rw-r--r--target/linux/generic-2.6/patches-2.6.29/920-01-hotpluggable-spi-gpio.patch60
1 files changed, 60 insertions, 0 deletions
diff --git a/target/linux/generic-2.6/patches-2.6.29/920-01-hotpluggable-spi-gpio.patch b/target/linux/generic-2.6/patches-2.6.29/920-01-hotpluggable-spi-gpio.patch
new file mode 100644
index 0000000000..d67607b271
--- /dev/null
+++ b/target/linux/generic-2.6/patches-2.6.29/920-01-hotpluggable-spi-gpio.patch
@@ -0,0 +1,60 @@
+Fix spi-gpio for hotplug.
+
+--mb
+
+
+
+--- a/drivers/spi/spi_gpio.c
++++ b/drivers/spi/spi_gpio.c
+@@ -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);
+