mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-30 22:26:55 +00:00
mmc: tmio: comment the ERR_PTR usage in this driver
It is not super obvious why the driver sometimes uses an ERR_PTR for the current mrq. Explain why in comments. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Link: https://lore.kernel.org/r/20240305105623.3379-2-wsa+renesas@sang-engineering.com Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
This commit is contained in:
parent
a5f372a1bb
commit
0cd8fd15a7
1 changed files with 3 additions and 1 deletions
|
@ -972,6 +972,7 @@ static void tmio_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Disallow new mrqs and work handlers to run */
|
||||||
host->mrq = ERR_PTR(-EBUSY);
|
host->mrq = ERR_PTR(-EBUSY);
|
||||||
|
|
||||||
spin_unlock_irqrestore(&host->lock, flags);
|
spin_unlock_irqrestore(&host->lock, flags);
|
||||||
|
@ -1006,8 +1007,9 @@ static void tmio_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
|
||||||
"%s.%d: IOS interrupted: clk %u, mode %u",
|
"%s.%d: IOS interrupted: clk %u, mode %u",
|
||||||
current->comm, task_pid_nr(current),
|
current->comm, task_pid_nr(current),
|
||||||
ios->clock, ios->power_mode);
|
ios->clock, ios->power_mode);
|
||||||
host->mrq = NULL;
|
|
||||||
|
|
||||||
|
/* Ready for new mrqs */
|
||||||
|
host->mrq = NULL;
|
||||||
host->clk_cache = ios->clock;
|
host->clk_cache = ios->clock;
|
||||||
|
|
||||||
mutex_unlock(&host->ios_lock);
|
mutex_unlock(&host->ios_lock);
|
||||||
|
|
Loading…
Reference in a new issue