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 <[email protected]>
Signed-off-by: Ulf Hansson <[email protected]>
This commit is contained in:
Adrian Hunter 2014-09-23 23:00:25 +03:00 • committed by Ulf Hansson
commit 6800754c36

View file

@ -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;
}