aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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)