[PATCH v3 2/2] mmc: mmci.c: Remove wrong error handling of gpio 0
From: Roland Stigge <hidden>
Date: 2012-06-17 10:12:46
Also in:
linux-mmc, lkml
From: Roland Stigge <hidden>
Date: 2012-06-17 10:12:46
Also in:
linux-mmc, lkml
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 <redacted> --- drivers/mmc/host/mmci.c | 5 ----- 1 file changed, 5 deletions(-)
--- linux-2.6.orig/drivers/mmc/host/mmci.c
+++ linux-2.6/drivers/mmc/host/mmci.c@@ -1216,12 +1216,7 @@ static void mmci_dt_populate_generic_pda 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;