ARM: 7426/1: mmc: mmci: Remove wrong error handling of gpio 0
authorRoland Stigge <stigge@antcom.de>
Sun, 17 Jun 2012 20:13:34 +0000 (21:13 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Sun, 17 Jun 2012 21:24:32 +0000 (22:24 +0100)
Zero is a valid GPIO and shouldn't be handled as an error return code from
of_get_named_gpio(). It was a leftover from old code before getting
pdata->gpio_*() was modified.

Signed-off-by: Roland Stigge <stigge@antcom.de>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
drivers/mmc/host/mmci.c

index 0045ee001ec752244a541de3e7f111ad826a14fc..78d3e484599752fa02e18a741ef47dca22a17d35 100644 (file)
@@ -1216,12 +1216,7 @@ static void mmci_dt_populate_generic_pdata(struct device_node *np,
        int bus_width = 0;
 
        pdata->gpio_wp = of_get_named_gpio(np, "wp-gpios", 0);
-       if (!pdata->gpio_wp)
-               pdata->gpio_wp = -1;
-
        pdata->gpio_cd = of_get_named_gpio(np, "cd-gpios", 0);
-       if (!pdata->gpio_cd)
-               pdata->gpio_cd = -1;
 
        if (of_get_property(np, "cd-inverted", NULL))
                pdata->cd_invert = true;