提交 3339d1e3 编写于 作者: J Johan Rudholm 提交者: Chris Ball

mmc: core: Do not rescan non-removable devices

If MMC_CAP_NONREMOVABLE is set, only issue a detect job on init.
Signed-off-by: NJohan Rudholm <johan.rudholm@stericsson.com>
Acked-by: NUlf Hansson <ulf.hansson@linaro.org>
Acked-by: NLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: NChris Ball <cjb@laptop.org>
上级 36c179a9
......@@ -2053,6 +2053,11 @@ void mmc_rescan(struct work_struct *work)
if (host->rescan_disable)
return;
/* If there is a non-removable card registered, only scan once */
if ((host->caps & MMC_CAP_NONREMOVABLE) && host->rescan_entered)
return;
host->rescan_entered = 1;
mmc_bus_get(host);
/*
......
......@@ -300,6 +300,7 @@ struct mmc_host {
#endif
int rescan_disable; /* disable card detection */
int rescan_entered; /* used with nonremovable devices */
struct mmc_card *card; /* device attached to this host */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册