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

Commit 85803cf3 authored by Dov Levenglick's avatar Dov Levenglick
Browse files

mmc: sd: fix crash with sd card



Change ID I1333e1d4330393e446ba48a9474c83295744c050
added a call to the bus specific runtime_idle
callback. This callback is only implemented for mmc
thereby causing a crash when other types of memory
(e.g. sd card) are used.
This patch only calls the callback if it is implemented.

Change-Id: Ie26b1b52fdcc0f4d5e3638801e28e965fae0cbeb
Signed-off-by: default avatarDov Levenglick <dovl@codeaurora.org>
parent 37bc52a5
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -211,7 +211,9 @@ static int mmc_runtime_idle(struct device *dev)
	struct mmc_card *card = mmc_dev_to_card(dev);
	struct mmc_host *host = card->host;

	if (host->bus_ops->runtime_idle)
		return host->bus_ops->runtime_idle(host);
	return 0;
}

#endif /* !CONFIG_PM_RUNTIME */