]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/base/cpu.c
[PATCH] Driver core: add proper symlinks for devices
[linux-2.6-omap-h63xx.git] / drivers / base / cpu.c
index 982e6583cd633a533fe8a7dbdfe30edc3cbd5437..dd712b24ec91900f3b75506af6ecf6467f7ba160 100644 (file)
@@ -19,11 +19,6 @@ EXPORT_SYMBOL(cpu_sysdev_class);
 static struct sys_device *cpu_sys_devices[NR_CPUS];
 
 #ifdef CONFIG_HOTPLUG_CPU
-int __attribute__((weak)) smp_prepare_cpu (int cpu)
-{
-       return 0;
-}
-
 static ssize_t show_online(struct sys_device *dev, char *buf)
 {
        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,
                        kobject_uevent(&dev->kobj, KOBJ_OFFLINE);
                break;
        case '1':
-               ret = smp_prepare_cpu(cpu->sysdev.id);
-               if (!ret)
-                       ret = cpu_up(cpu->sysdev.id);
+               ret = cpu_up(cpu->sysdev.id);
                if (!ret)
                        kobject_uevent(&dev->kobj, KOBJ_ONLINE);
                break;
@@ -101,10 +94,8 @@ static ssize_t show_crash_notes(struct sys_device *dev, char *buf)
         * boot up and this data does not change there after. Hence this
         * operation should be safe. No locking required.
         */
-       get_cpu();
        addr = __pa(per_cpu_ptr(crash_notes, cpunum));
        rc = sprintf(buf, "%Lx\n", addr);
-       put_cpu();
        return rc;
 }
 static SYSDEV_ATTR(crash_notes, 0400, show_crash_notes, NULL);
@@ -143,7 +134,7 @@ int __devinit register_cpu(struct cpu *cpu, int num, struct node *root)
        return error;
 }
 
-struct sys_device *get_cpu_sysdev(int cpu)
+struct sys_device *get_cpu_sysdev(unsigned cpu)
 {
        if (cpu < NR_CPUS)
                return cpu_sys_devices[cpu];