Skip to content

Commit 0cd8fd1

Browse files
Wolfram Sangstorulf
authored andcommitted
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
1 parent a5f372a commit 0cd8fd1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/mmc/host/tmio_mmc_core.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -972,6 +972,7 @@ static void tmio_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
972972
return;
973973
}
974974

975+
/* Disallow new mrqs and work handlers to run */
975976
host->mrq = ERR_PTR(-EBUSY);
976977

977978
spin_unlock_irqrestore(&host->lock, flags);
@@ -1006,8 +1007,9 @@ static void tmio_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
10061007
"%s.%d: IOS interrupted: clk %u, mode %u",
10071008
current->comm, task_pid_nr(current),
10081009
ios->clock, ios->power_mode);
1009-
host->mrq = NULL;
10101010

1011+
/* Ready for new mrqs */
1012+
host->mrq = NULL;
10111013
host->clk_cache = ios->clock;
10121014

10131015
mutex_unlock(&host->ios_lock);

0 commit comments

Comments
 (0)