diff options
author | Florian Fainelli <florian@openwrt.org> | 2012-01-28 13:19:43 +0000 |
---|---|---|
committer | Florian Fainelli <florian@openwrt.org> | 2012-01-28 13:19:43 +0000 |
commit | 405a0f390567dc8be1b3ad598f76d77e332bdfa3 (patch) | |
tree | 3795dd6986b39f6aaebdfecd39741ca486e68e5b /target/linux/ar71xx/patches-3.2/204-spi-ath79-use-gpio_request_one.patch | |
parent | 478d9fc97e9d8e8ce922edc6fd9ec3599be548d3 (diff) | |
download | mtk-20170518-405a0f390567dc8be1b3ad598f76d77e332bdfa3.zip mtk-20170518-405a0f390567dc8be1b3ad598f76d77e332bdfa3.tar.gz mtk-20170518-405a0f390567dc8be1b3ad598f76d77e332bdfa3.tar.bz2 |
refresh 3.2 patches
SVN-Revision: 29934
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.patch | 13 |
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 0484d3d..1f607fd 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)); } |