aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ar71xx/patches-3.2/204-spi-ath79-use-gpio_request_one.patch
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/ar71xx/patches-3.2/204-spi-ath79-use-gpio_request_one.patch')
-rw-r--r--target/linux/ar71xx/patches-3.2/204-spi-ath79-use-gpio_request_one.patch13
1 files changed, 7 insertions, 6 deletions
diff --git a/target/linux/ar71xx/patches-3.2/204-spi-ath79-use-gpio_request_one.patch b/target/linux/ar71xx/patches-3.2/204-spi-ath79-use-gpio_request_one.patch
index 0484d3d7f3..1f607fd5dd 100644
--- a/target/linux/ar71xx/patches-3.2/204-spi-ath79-use-gpio_request_one.patch
+++ b/target/linux/ar71xx/patches-3.2/204-spi-ath79-use-gpio_request_one.patch
@@ -32,18 +32,19 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
- status = gpio_request(cdata->gpio, dev_name(&spi->dev));
- if (status)
- return status;
-+ flags = GPIOF_DIR_OUT;
-+ if (spi->mode & SPI_CS_HIGH)
-+ flags |= GPIOF_INIT_HIGH;
-+ else
-+ flags |= GPIOF_INIT_LOW;
-
+-
- status = gpio_direction_output(cdata->gpio,
- spi->mode & SPI_CS_HIGH);
- if (status) {
- gpio_free(cdata->gpio);
- return status;
- }
++ flags = GPIOF_DIR_OUT;
++ if (spi->mode & SPI_CS_HIGH)
++ flags |= GPIOF_INIT_HIGH;
++ else
++ flags |= GPIOF_INIT_LOW;
++
+ status = gpio_request_one(cdata->gpio, flags,
+ dev_name(&spi->dev));
}