Update to 2.6.32.41 Mainline
/drivers/mmc/core/host.c
blob:ccaba94487dfd1d94a40c111f4f5bc807c5c9819 -> blob:9409d7adea7d7f7b4f9272c0dfc11fc03bf6a933
--- drivers/mmc/core/host.c
+++ drivers/mmc/core/host.c
@@ -16,6 +16,7 @@
#include <linux/idr.h>
#include <linux/pagemap.h>
#include <linux/leds.h>
+#include <linux/suspend.h>
#include <linux/mmc/host.h>
@@ -85,6 +86,9 @@ struct mmc_host *mmc_alloc_host(int extr
INIT_DELAYED_WORK(&host->detect, mmc_rescan);
INIT_DELAYED_WORK(&host->remove, mmc_remove_sd_card);
INIT_DELAYED_WORK_DEFERRABLE(&host->disable, mmc_host_deeper_disable);
+#ifdef CONFIG_PM
+ host->pm_notify.notifier_call = mmc_pm_notify;
+#endif
/*
* By default, hosts do not support SGIO or large requests.
@@ -133,6 +137,7 @@ int mmc_add_host(struct mmc_host *host)
#endif
mmc_start_host(host);
+ register_pm_notifier(&host->pm_notify);
return 0;
}
@@ -149,6 +154,7 @@ EXPORT_SYMBOL(mmc_add_host);
*/
void mmc_remove_host(struct mmc_host *host)
{
+ unregister_pm_notifier(&host->pm_notify);
mmc_stop_host(host);
#ifdef CONFIG_DEBUG_FS