aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2014-08-27 07:00:50 -0400
committerUlf Hansson <ulf.hansson@linaro.org>2014-09-09 08:25:14 -0400
commit9fbc695075e905b9201100860eacac6349db6644 (patch)
tree3cfecf3becf2d80be974cb22626e323be4cfbb21 /drivers/mmc
parentf5b4d71f72c5f08c2e1d0af68ef881f85537e7a1 (diff)
mmc: slot-gpio: switch to use flags when getting GPIO
When the slot GPIO driver gets the GPIO to be used for card detect, it is now possible to specify a flag to have the line set up as input. Get rid of the explicit setup call for input and use the flag. The extra argument works as there are transition varargs macros in place in the <linux/gpio/consumer.h> header, in the future we will make the flags argument compulsory. Reviewed-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/core/slot-gpio.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/mmc/core/slot-gpio.c b/drivers/mmc/core/slot-gpio.c
index 5f89cb83d5f0..908c2b29e79f 100644
--- a/drivers/mmc/core/slot-gpio.c
+++ b/drivers/mmc/core/slot-gpio.c
@@ -308,14 +308,10 @@ int mmc_gpiod_request_cd(struct mmc_host *host, const char *con_id,
308 if (!con_id) 308 if (!con_id)
309 con_id = ctx->cd_label; 309 con_id = ctx->cd_label;
310 310
311 desc = devm_gpiod_get_index(host->parent, con_id, idx); 311 desc = devm_gpiod_get_index(host->parent, con_id, idx, GPIOD_IN);
312 if (IS_ERR(desc)) 312 if (IS_ERR(desc))
313 return PTR_ERR(desc); 313 return PTR_ERR(desc);
314 314
315 ret = gpiod_direction_input(desc);
316 if (ret < 0)
317 return ret;
318
319 if (debounce) { 315 if (debounce) {
320 ret = gpiod_set_debounce(desc, debounce); 316 ret = gpiod_set_debounce(desc, debounce);
321 if (ret < 0) 317 if (ret < 0)