ramips: use gpio-keys-polled instead of gpio-buttons
[openwrt.git] / target / linux / ar71xx / patches-3.2 / 204-spi-ath79-use-gpio_request_one.patch
index 0484d3d..1f607fd 100644 (file)
@@ -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));
        }
This page took 0.025421 seconds and 4 git commands to generate.