diff options
Diffstat (limited to 'drivers/mmc/core/host.c')
-rw-r--r-- | drivers/mmc/core/host.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/mmc/core/host.c b/drivers/mmc/core/host.c index 47353909e345..0efe631e50ca 100644 --- a/drivers/mmc/core/host.c +++ b/drivers/mmc/core/host.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/pagemap.h> | 17 | #include <linux/pagemap.h> |
18 | #include <linux/leds.h> | 18 | #include <linux/leds.h> |
19 | #include <linux/slab.h> | 19 | #include <linux/slab.h> |
20 | #include <linux/suspend.h> | ||
20 | 21 | ||
21 | #include <linux/mmc/host.h> | 22 | #include <linux/mmc/host.h> |
22 | 23 | ||
@@ -85,6 +86,7 @@ struct mmc_host *mmc_alloc_host(int extra, struct device *dev) | |||
85 | init_waitqueue_head(&host->wq); | 86 | init_waitqueue_head(&host->wq); |
86 | INIT_DELAYED_WORK(&host->detect, mmc_rescan); | 87 | INIT_DELAYED_WORK(&host->detect, mmc_rescan); |
87 | INIT_DELAYED_WORK_DEFERRABLE(&host->disable, mmc_host_deeper_disable); | 88 | INIT_DELAYED_WORK_DEFERRABLE(&host->disable, mmc_host_deeper_disable); |
89 | host->pm_notify.notifier_call = mmc_pm_notify; | ||
88 | 90 | ||
89 | /* | 91 | /* |
90 | * By default, hosts do not support SGIO or large requests. | 92 | * By default, hosts do not support SGIO or large requests. |
@@ -133,6 +135,7 @@ int mmc_add_host(struct mmc_host *host) | |||
133 | #endif | 135 | #endif |
134 | 136 | ||
135 | mmc_start_host(host); | 137 | mmc_start_host(host); |
138 | register_pm_notifier(&host->pm_notify); | ||
136 | 139 | ||
137 | return 0; | 140 | return 0; |
138 | } | 141 | } |
@@ -149,6 +152,7 @@ EXPORT_SYMBOL(mmc_add_host); | |||
149 | */ | 152 | */ |
150 | void mmc_remove_host(struct mmc_host *host) | 153 | void mmc_remove_host(struct mmc_host *host) |
151 | { | 154 | { |
155 | unregister_pm_notifier(&host->pm_notify); | ||
152 | mmc_stop_host(host); | 156 | mmc_stop_host(host); |
153 | 157 | ||
154 | #ifdef CONFIG_DEBUG_FS | 158 | #ifdef CONFIG_DEBUG_FS |