summaryrefslogtreecommitdiffstats
path: root/drivers/mmc
diff options
context:
space:
mode:
authorAdrian Hunter <adrian.hunter@intel.com>2014-09-23 23:00:25 +0300
committerUlf Hansson <ulf.hansson@linaro.org>2014-09-29 11:27:51 +0200
commit6800754c3674fb36350b2df9c3f84676e7e7a8f7 (patch)
tree4e0828da9df9eb668bda45ab36b94083cdd28a03 /drivers/mmc
parent5fef365b64b99d298d724b30b5c291b05d169f58 (diff)
downloadlinux-6800754c3674fb36350b2df9c3f84676e7e7a8f7.tar.bz2
mmc: Fix use of wrong device in mmc_gpiod_free_cd()
mmc_gpiod_free_cd() is paired with mmc_gpiod_request_cd() and both must reference the same device which is the actual host controller device not the mmc_host class device. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/core/slot-gpio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mmc/core/slot-gpio.c b/drivers/mmc/core/slot-gpio.c
index 3af30e94fd0c..38f76555d4bf 100644
--- a/drivers/mmc/core/slot-gpio.c
+++ b/drivers/mmc/core/slot-gpio.c
@@ -390,7 +390,7 @@ void mmc_gpiod_free_cd(struct mmc_host *host)
host->slot.cd_irq = -EINVAL;
}
- devm_gpiod_put(&host->class_dev, ctx->cd_gpio);
+ devm_gpiod_put(host->parent, ctx->cd_gpio);
ctx->cd_gpio = NULL;
}