浏览代码

mmc: slot-gpio: Don't override con_id when request descriptor

The caller may supply connection ID, index, or both. All combinations are
possible and mmc framework should not make any assumption on what exactly
caller wants.

Remove con_id override conditionals in mmc_gpiod_request_ro() and
mmc_gpiod_request_cd().

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Andy Shevchenko 9 年之前
父节点
当前提交
c1ada71fb7
共有 1 个文件被更改,包括 0 次插入6 次删除
  1. 0 6
      drivers/mmc/core/slot-gpio.c

+ 0 - 6
drivers/mmc/core/slot-gpio.c

@@ -235,9 +235,6 @@ int mmc_gpiod_request_cd(struct mmc_host *host, const char *con_id,
 	struct gpio_desc *desc;
 	struct gpio_desc *desc;
 	int ret;
 	int ret;
 
 
-	if (!con_id)
-		con_id = ctx->cd_label;
-
 	desc = devm_gpiod_get_index(host->parent, con_id, idx, GPIOD_IN);
 	desc = devm_gpiod_get_index(host->parent, con_id, idx, GPIOD_IN);
 	if (IS_ERR(desc))
 	if (IS_ERR(desc))
 		return PTR_ERR(desc);
 		return PTR_ERR(desc);
@@ -289,9 +286,6 @@ int mmc_gpiod_request_ro(struct mmc_host *host, const char *con_id,
 	struct gpio_desc *desc;
 	struct gpio_desc *desc;
 	int ret;
 	int ret;
 
 
-	if (!con_id)
-		con_id = ctx->ro_label;
-
 	desc = devm_gpiod_get_index(host->parent, con_id, idx, GPIOD_IN);
 	desc = devm_gpiod_get_index(host->parent, con_id, idx, GPIOD_IN);
 	if (IS_ERR(desc))
 	if (IS_ERR(desc))
 		return PTR_ERR(desc);
 		return PTR_ERR(desc);