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

Commit 804ba145 authored by Dmitry Shmidt's avatar Dmitry Shmidt Committed by Alistair Strachan
Browse files

ANDROID: mmc: core: Add "ignore mmc pm notify" functionality



Used to prevent remounting MMC on suspend/resume.

Bug: 120441127
Change-Id: I20821a82831b07ca037973d5d92e832372c6b583
Signed-off-by: default avatarDmitry Shmidt <dimitrysh@google.com>
parent d5f48707
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -441,6 +441,7 @@ int mmc_add_host(struct mmc_host *host)
#endif

	mmc_start_host(host);
	if (!(host->pm_flags & MMC_PM_IGNORE_PM_NOTIFY))
		mmc_register_pm_notifier(host);

	return 0;
@@ -458,6 +459,7 @@ EXPORT_SYMBOL(mmc_add_host);
 */
void mmc_remove_host(struct mmc_host *host)
{
	if (!(host->pm_flags & MMC_PM_IGNORE_PM_NOTIFY))
		mmc_unregister_pm_notifier(host);
	mmc_stop_host(host);

+1 −0
Original line number Diff line number Diff line
@@ -26,5 +26,6 @@ typedef unsigned int mmc_pm_flag_t;

#define MMC_PM_KEEP_POWER	(1 << 0)	/* preserve card power during suspend */
#define MMC_PM_WAKE_SDIO_IRQ	(1 << 1)	/* wake up host system on SDIO IRQ assertion */
#define MMC_PM_IGNORE_PM_NOTIFY	(1 << 2)	/* ignore mmc pm notify */

#endif /* LINUX_MMC_PM_H */