aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/base')
-rw-r--r--drivers/base/cpu.c9
-rw-r--r--drivers/base/memory.c8
2 files changed, 5 insertions, 12 deletions
diff --git a/drivers/base/cpu.c b/drivers/base/cpu.c
index 29f3d7504da1..dd712b24ec91 100644
--- a/drivers/base/cpu.c
+++ b/drivers/base/cpu.c
@@ -19,11 +19,6 @@ EXPORT_SYMBOL(cpu_sysdev_class);
19static struct sys_device *cpu_sys_devices[NR_CPUS]; 19static struct sys_device *cpu_sys_devices[NR_CPUS];
20 20
21#ifdef CONFIG_HOTPLUG_CPU 21#ifdef CONFIG_HOTPLUG_CPU
22int __attribute__((weak)) smp_prepare_cpu (int cpu)
23{
24 return 0;
25}
26
27static ssize_t show_online(struct sys_device *dev, char *buf) 22static ssize_t show_online(struct sys_device *dev, char *buf)
28{ 23{
29 struct cpu *cpu = container_of(dev, struct cpu, sysdev); 24 struct cpu *cpu = container_of(dev, struct cpu, sysdev);
@@ -44,9 +39,7 @@ static ssize_t store_online(struct sys_device *dev, const char *buf,
44 kobject_uevent(&dev->kobj, KOBJ_OFFLINE); 39 kobject_uevent(&dev->kobj, KOBJ_OFFLINE);
45 break; 40 break;
46 case '1': 41 case '1':
47 ret = smp_prepare_cpu(cpu->sysdev.id); 42 ret = cpu_up(cpu->sysdev.id);
48 if (!ret)
49 ret = cpu_up(cpu->sysdev.id);
50 if (!ret) 43 if (!ret)
51 kobject_uevent(&dev->kobj, KOBJ_ONLINE); 44 kobject_uevent(&dev->kobj, KOBJ_ONLINE);
52 break; 45 break;
diff --git a/drivers/base/memory.c b/drivers/base/memory.c
index 105a0d61eb1f..dd547af4681a 100644
--- a/drivers/base/memory.c
+++ b/drivers/base/memory.c
@@ -47,16 +47,16 @@ static struct kset_uevent_ops memory_uevent_ops = {
47 .uevent = memory_uevent, 47 .uevent = memory_uevent,
48}; 48};
49 49
50static struct notifier_block *memory_chain; 50static BLOCKING_NOTIFIER_HEAD(memory_chain);
51 51
52int register_memory_notifier(struct notifier_block *nb) 52int register_memory_notifier(struct notifier_block *nb)
53{ 53{
54 return notifier_chain_register(&memory_chain, nb); 54 return blocking_notifier_chain_register(&memory_chain, nb);
55} 55}
56 56
57void unregister_memory_notifier(struct notifier_block *nb) 57void unregister_memory_notifier(struct notifier_block *nb)
58{ 58{
59 notifier_chain_unregister(&memory_chain, nb); 59 blocking_notifier_chain_unregister(&memory_chain, nb);
60} 60}
61 61
62/* 62/*
@@ -140,7 +140,7 @@ static ssize_t show_mem_state(struct sys_device *dev, char *buf)
140 140
141static inline int memory_notify(unsigned long val, void *v) 141static inline int memory_notify(unsigned long val, void *v)
142{ 142{
143 return notifier_call_chain(&memory_chain, val, v); 143 return blocking_notifier_call_chain(&memory_chain, val, v);
144} 144}
145 145
146/* 146/*