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

Commit 3339d1e3 authored by Johan Rudholm's avatar Johan Rudholm Committed by Chris Ball
Browse files

mmc: core: Do not rescan non-removable devices



If MMC_CAP_NONREMOVABLE is set, only issue a detect job on init.

Signed-off-by: default avatarJohan Rudholm <johan.rudholm@stericsson.com>
Acked-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
Acked-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: default avatarChris Ball <cjb@laptop.org>
parent 36c179a9
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -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);

	/*
+1 −0
Original line number Diff line number Diff line
@@ -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 */