aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/xburst/patches-2.6.32/400-spi-gpio-3wire.patch
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2010-01-11 04:44:45 +0000
committerLars-Peter Clausen <lars@metafoo.de>2010-01-11 04:44:45 +0000
commit4a18a35a91f6650deea92052c9fb74c1b90d7428 (patch)
tree9f8851bc32dbcd5a39bcb13ecf294dff3902aeab /target/linux/xburst/patches-2.6.32/400-spi-gpio-3wire.patch
parent2710572b04ad8ad7b1e100083efbec70f8b61007 (diff)
downloadmaster-187ad058-4a18a35a91f6650deea92052c9fb74c1b90d7428.tar.gz
master-187ad058-4a18a35a91f6650deea92052c9fb74c1b90d7428.tar.bz2
master-187ad058-4a18a35a91f6650deea92052c9fb74c1b90d7428.zip
Merge xburst target.
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@19098 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/xburst/patches-2.6.32/400-spi-gpio-3wire.patch')
-rw-r--r--target/linux/xburst/patches-2.6.32/400-spi-gpio-3wire.patch51
1 files changed, 51 insertions, 0 deletions
diff --git a/target/linux/xburst/patches-2.6.32/400-spi-gpio-3wire.patch b/target/linux/xburst/patches-2.6.32/400-spi-gpio-3wire.patch
new file mode 100644
index 0000000000..dc81a67df6
--- /dev/null
+++ b/target/linux/xburst/patches-2.6.32/400-spi-gpio-3wire.patch
@@ -0,0 +1,51 @@
+From df07ed6a52d9f6027ff1753c00b3128fa18dde31 Mon Sep 17 00:00:00 2001
+From: Lars-Peter Clausen <lars@metafoo.de>
+Date: Mon, 11 Jan 2010 04:29:48 +0100
+Subject: [PATCH] /opt/Projects/openwrt/target/linux/xburst/patches-2.6.31/400-spi-gpio-3wire.patch
+
+---
+ drivers/spi/spi_gpio.c | 14 +++++++++-----
+ 1 files changed, 9 insertions(+), 5 deletions(-)
+
+diff --git a/drivers/spi/spi_gpio.c b/drivers/spi/spi_gpio.c
+index 26bd03e..5f89c21 100644
+--- a/drivers/spi/spi_gpio.c
++++ b/drivers/spi/spi_gpio.c
+@@ -243,9 +243,11 @@ spi_gpio_request(struct spi_gpio_platform_data *pdata, const char *label)
+ if (value)
+ goto done;
+
+- value = spi_gpio_alloc(SPI_MISO_GPIO, label, true);
+- if (value)
+- goto free_mosi;
++ if (SPI_MISO_GPIO != SPI_MOSI_GPIO) {
++ value = spi_gpio_alloc(SPI_MISO_GPIO, label, true);
++ if (value)
++ goto free_mosi;
++ }
+
+ value = spi_gpio_alloc(SPI_SCK_GPIO, label, false);
+ if (value)
+@@ -308,7 +310,8 @@ static int __init spi_gpio_probe(struct platform_device *pdev)
+ if (status < 0) {
+ spi_master_put(spi_gpio->bitbang.master);
+ gpio_free:
+- gpio_free(SPI_MISO_GPIO);
++ if (SPI_MISO_GPIO != SPI_MOSI_GPIO)
++ gpio_free(SPI_MISO_GPIO);
+ gpio_free(SPI_MOSI_GPIO);
+ gpio_free(SPI_SCK_GPIO);
+ spi_master_put(master);
+@@ -332,7 +335,8 @@ static int __exit spi_gpio_remove(struct platform_device *pdev)
+
+ platform_set_drvdata(pdev, NULL);
+
+- gpio_free(SPI_MISO_GPIO);
++ if (SPI_MISO_GPIO != SPI_MOSI_GPIO)
++ gpio_free(SPI_MISO_GPIO);
+ gpio_free(SPI_MOSI_GPIO);
+ gpio_free(SPI_SCK_GPIO);
+
+--
+1.5.6.5
+