goto err_free_cpumask;
        }
  
 -      /*
 -       * Do not start hotplugged CPUs now, but when they
 -       * are onlined the first time
 -       */
 -      if (pr->flags.need_hotplug_init)
 -              return 0;
 +#ifdef CONFIG_CPU_FREQ
 +      acpi_processor_ppc_has_changed(pr, 0);
 +      acpi_processor_load_module(pr);
 +#endif
 +      acpi_processor_get_throttling_info(pr);
 +      acpi_processor_get_limit_info(pr);
 +
 +      if (!cpuidle_get_driver() || cpuidle_get_driver() == &acpi_idle_driver)
 +              acpi_processor_power_init(pr, device);
 +
 +      pr->cdev = thermal_cooling_device_register("Processor", device,
 +                                              &processor_cooling_ops);
 +      if (IS_ERR(pr->cdev)) {
 +              result = PTR_ERR(pr->cdev);
-               goto err_power_exit;
++              goto err_remove_sysfs;
 +      }
  
-       dev_dbg(&device->dev, "registered as cooling_device%d\n",
-                pr->cdev->id);
+       /*
+        * Do not start hotplugged CPUs now, but when they
+        * are onlined the first time
+        */
+       if (pr->flags.need_hotplug_init)
+               return 0;
  
-       result = sysfs_create_link(&device->dev.kobj,
-                                  &pr->cdev->device.kobj,
-                                  "thermal_cooling");
-       if (result) {
-               printk(KERN_ERR PREFIX "Create sysfs link\n");
-               goto err_thermal_unregister;
-       }
-       result = sysfs_create_link(&pr->cdev->device.kobj,
-                                  &device->dev.kobj,
-                                  "device");
-       if (result) {
-               printk(KERN_ERR PREFIX "Create sysfs link\n");
+       result = acpi_processor_start(pr);
+       if (result)
                goto err_remove_sysfs;
-       }
  
        return 0;