Merge branch 'android-4.4'
[firefly-linux-kernel-4.4.55.git] / drivers / mmc / core / host.c
index 9ced8125fbdf0fc149f148efac2810e9f12415e3..871989e7c228dc0d468e8ab5f889974684d871ba 100644 (file)
@@ -403,7 +403,8 @@ int mmc_add_host(struct mmc_host *host)
 #endif
 
        mmc_start_host(host);
-       register_pm_notifier(&host->pm_notify);
+       if (!(host->pm_flags & MMC_PM_IGNORE_PM_NOTIFY))
+               register_pm_notifier(&host->pm_notify);
 
        if (host->restrict_caps & RESTRICT_CARD_TYPE_SDIO)
                primary_sdio_host = host;
@@ -423,7 +424,9 @@ EXPORT_SYMBOL(mmc_add_host);
  */
 void mmc_remove_host(struct mmc_host *host)
 {
-       unregister_pm_notifier(&host->pm_notify);
+       if (!(host->pm_flags & MMC_PM_IGNORE_PM_NOTIFY))
+               unregister_pm_notifier(&host->pm_notify);
+
        mmc_stop_host(host);
 
 #ifdef CONFIG_DEBUG_FS