diff options
Diffstat (limited to 'drivers/base')
-rw-r--r-- | drivers/base/memory.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/drivers/base/memory.c b/drivers/base/memory.c index c41d0728efe2..7868707c7eda 100644 --- a/drivers/base/memory.c +++ b/drivers/base/memory.c | |||
@@ -137,7 +137,7 @@ static ssize_t show_mem_state(struct sys_device *dev, char *buf) | |||
137 | return len; | 137 | return len; |
138 | } | 138 | } |
139 | 139 | ||
140 | static inline int memory_notify(unsigned long val, void *v) | 140 | int memory_notify(unsigned long val, void *v) |
141 | { | 141 | { |
142 | return blocking_notifier_call_chain(&memory_chain, val, v); | 142 | return blocking_notifier_call_chain(&memory_chain, val, v); |
143 | } | 143 | } |
@@ -183,7 +183,6 @@ memory_block_action(struct memory_block *mem, unsigned long action) | |||
183 | break; | 183 | break; |
184 | case MEM_OFFLINE: | 184 | case MEM_OFFLINE: |
185 | mem->state = MEM_GOING_OFFLINE; | 185 | mem->state = MEM_GOING_OFFLINE; |
186 | memory_notify(MEM_GOING_OFFLINE, NULL); | ||
187 | start_paddr = page_to_pfn(first_page) << PAGE_SHIFT; | 186 | start_paddr = page_to_pfn(first_page) << PAGE_SHIFT; |
188 | ret = remove_memory(start_paddr, | 187 | ret = remove_memory(start_paddr, |
189 | PAGES_PER_SECTION << PAGE_SHIFT); | 188 | PAGES_PER_SECTION << PAGE_SHIFT); |
@@ -191,7 +190,6 @@ memory_block_action(struct memory_block *mem, unsigned long action) | |||
191 | mem->state = old_state; | 190 | mem->state = old_state; |
192 | break; | 191 | break; |
193 | } | 192 | } |
194 | memory_notify(MEM_MAPPING_INVALID, NULL); | ||
195 | break; | 193 | break; |
196 | default: | 194 | default: |
197 | printk(KERN_WARNING "%s(%p, %ld) unknown action: %ld\n", | 195 | printk(KERN_WARNING "%s(%p, %ld) unknown action: %ld\n", |
@@ -199,11 +197,6 @@ memory_block_action(struct memory_block *mem, unsigned long action) | |||
199 | WARN_ON(1); | 197 | WARN_ON(1); |
200 | ret = -EINVAL; | 198 | ret = -EINVAL; |
201 | } | 199 | } |
202 | /* | ||
203 | * For now, only notify on successful memory operations | ||
204 | */ | ||
205 | if (!ret) | ||
206 | memory_notify(action, NULL); | ||
207 | 200 | ||
208 | return ret; | 201 | return ret; |
209 | } | 202 | } |