Skip to content

Commit

Permalink
ARM: 7426/1: mmc: mmci: Remove wrong error handling of gpio 0
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Roland Stigge authored and Russell King committed Jun 17, 2012
1 parent 667d1b4 commit f433809
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions drivers/mmc/host/mmci.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit f433809

Please sign in to comment.