X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/e0b80e41eb0b24e76285b9355725d2f4f66ada50..8b4aee843bbd9d4e87e2c63b9c6d9d34c142a272:/target/linux/ar71xx/patches-3.2/204-spi-ath79-use-gpio_request_one.patch?ds=sidebyside 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 0484d3d7f..1f607fd5d 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 - 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)); }