Skip to content

Commit ed54ef9

Browse files
Veerabhadrarao BadigantiUlf Hansson
authored andcommitted
mmc: core: Set default power mode in mmc_alloc_host()
Set the default power mode, MMC_POWER_UNDEFINED, in mmc_alloc_host() rather than in mmc_start_host(). This enables host drivers to make use of the initial state during ->probe(). Signed-off-by: Veerabhadrarao Badiganti <vbadigan@codeaurora.org> Link: https://lore.kernel.org/r/1592919288-1020-3-git-send-email-vbadigan@codeaurora.org Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
1 parent 0fcb031 commit ed54ef9

2 files changed

Lines changed: 1 addition & 1 deletion

File tree

‎drivers/mmc/core/core.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2303,7 +2303,6 @@ void mmc_start_host(struct mmc_host *host)
23032303
{
23042304
host->f_init = max(min(freqs[0], host->f_max), host->f_min);
23052305
host->rescan_disable = 0;
2306-
host->ios.power_mode = MMC_POWER_UNDEFINED;
23072306

23082307
if (!(host->caps2 & MMC_CAP2_NO_PRESCAN_POWERUP)) {
23092308
mmc_claim_host(host);

‎drivers/mmc/core/host.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -434,6 +434,7 @@ struct mmc_host *mmc_alloc_host(int extra, struct device *dev)
434434

435435
host->fixed_drv_type = -EINVAL;
436436
host->ios.power_delay_ms = 10;
437+
host->ios.power_mode = MMC_POWER_UNDEFINED;
437438

438439
return host;
439440
}

0 commit comments

Comments
 (0)