diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/base/cpu.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/base/cpu.c b/drivers/base/cpu.c index bdd7e9f55c81..0bf2dc11cdb8 100644 --- a/drivers/base/cpu.c +++ b/drivers/base/cpu.c | |||
@@ -16,9 +16,10 @@ struct sysdev_class cpu_sysdev_class = { | |||
16 | EXPORT_SYMBOL(cpu_sysdev_class); | 16 | EXPORT_SYMBOL(cpu_sysdev_class); |
17 | 17 | ||
18 | #ifdef CONFIG_HOTPLUG_CPU | 18 | #ifdef CONFIG_HOTPLUG_CPU |
19 | #ifndef __HAVE_ARCH_SMP_PREPARE_CPU | 19 | int __attribute__((weak)) smp_prepare_cpu (int cpu) |
20 | #define smp_prepare_cpu(cpu) (0) | 20 | { |
21 | #endif | 21 | return 0; |
22 | } | ||
22 | 23 | ||
23 | static ssize_t show_online(struct sys_device *dev, char *buf) | 24 | static ssize_t show_online(struct sys_device *dev, char *buf) |
24 | { | 25 | { |
@@ -41,7 +42,7 @@ static ssize_t store_online(struct sys_device *dev, const char *buf, | |||
41 | break; | 42 | break; |
42 | case '1': | 43 | case '1': |
43 | ret = smp_prepare_cpu(cpu->sysdev.id); | 44 | ret = smp_prepare_cpu(cpu->sysdev.id); |
44 | if (ret == 0) | 45 | if (!ret) |
45 | ret = cpu_up(cpu->sysdev.id); | 46 | ret = cpu_up(cpu->sysdev.id); |
46 | break; | 47 | break; |
47 | default: | 48 | default: |