Skip to content

Commit

Permalink
mmc: Do not call get_cd for non removable cards
Browse files Browse the repository at this point in the history
Non removable cards are always present, so do not call get_cd for them.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
  • Loading branch information
Sascha Hauer authored and Chris Ball committed Jan 13, 2014
1 parent 07c001c commit c1b55bf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/mmc/core/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -2460,7 +2460,8 @@ void mmc_rescan(struct work_struct *work)
*/
mmc_bus_put(host);

if (host->ops->get_cd && host->ops->get_cd(host) == 0) {
if (!(host->caps & MMC_CAP_NONREMOVABLE) && host->ops->get_cd &&
host->ops->get_cd(host) == 0) {
mmc_claim_host(host);
mmc_power_off(host);
mmc_release_host(host);
Expand Down

0 comments on commit c1b55bf

Please sign in to comment.