Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6800754c authored by Adrian Hunter's avatar Adrian Hunter Committed by Ulf Hansson
Browse files

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: default avatarAdrian Hunter <adrian.hunter@intel.com>
Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent 5fef365b
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -390,7 +390,7 @@ void mmc_gpiod_free_cd(struct mmc_host *host)
		host->slot.cd_irq = -EINVAL;
		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;
	ctx->cd_gpio = NULL;
}
}