diff options
Diffstat (limited to 'drivers/cpuidle/cpuidle.c')
-rw-r--r-- | drivers/cpuidle/cpuidle.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/cpuidle/cpuidle.c b/drivers/cpuidle/cpuidle.c index 06ce2680d00d..59f4261c753a 100644 --- a/drivers/cpuidle/cpuidle.c +++ b/drivers/cpuidle/cpuidle.c | |||
@@ -291,10 +291,10 @@ EXPORT_SYMBOL_GPL(cpuidle_disable_device); | |||
291 | static int __cpuidle_register_device(struct cpuidle_device *dev) | 291 | static int __cpuidle_register_device(struct cpuidle_device *dev) |
292 | { | 292 | { |
293 | int ret; | 293 | int ret; |
294 | struct sys_device *sys_dev = get_cpu_sysdev((unsigned long)dev->cpu); | 294 | struct device *cpu_dev = get_cpu_device((unsigned long)dev->cpu); |
295 | struct cpuidle_driver *cpuidle_driver = cpuidle_get_driver(); | 295 | struct cpuidle_driver *cpuidle_driver = cpuidle_get_driver(); |
296 | 296 | ||
297 | if (!sys_dev) | 297 | if (!dev) |
298 | return -EINVAL; | 298 | return -EINVAL; |
299 | if (!try_module_get(cpuidle_driver->owner)) | 299 | if (!try_module_get(cpuidle_driver->owner)) |
300 | return -EINVAL; | 300 | return -EINVAL; |
@@ -303,7 +303,7 @@ static int __cpuidle_register_device(struct cpuidle_device *dev) | |||
303 | 303 | ||
304 | per_cpu(cpuidle_devices, dev->cpu) = dev; | 304 | per_cpu(cpuidle_devices, dev->cpu) = dev; |
305 | list_add(&dev->device_list, &cpuidle_detected_devices); | 305 | list_add(&dev->device_list, &cpuidle_detected_devices); |
306 | if ((ret = cpuidle_add_sysfs(sys_dev))) { | 306 | if ((ret = cpuidle_add_sysfs(cpu_dev))) { |
307 | module_put(cpuidle_driver->owner); | 307 | module_put(cpuidle_driver->owner); |
308 | return ret; | 308 | return ret; |
309 | } | 309 | } |
@@ -344,7 +344,7 @@ EXPORT_SYMBOL_GPL(cpuidle_register_device); | |||
344 | */ | 344 | */ |
345 | void cpuidle_unregister_device(struct cpuidle_device *dev) | 345 | void cpuidle_unregister_device(struct cpuidle_device *dev) |
346 | { | 346 | { |
347 | struct sys_device *sys_dev = get_cpu_sysdev((unsigned long)dev->cpu); | 347 | struct device *cpu_dev = get_cpu_device((unsigned long)dev->cpu); |
348 | struct cpuidle_driver *cpuidle_driver = cpuidle_get_driver(); | 348 | struct cpuidle_driver *cpuidle_driver = cpuidle_get_driver(); |
349 | 349 | ||
350 | if (dev->registered == 0) | 350 | if (dev->registered == 0) |
@@ -354,7 +354,7 @@ void cpuidle_unregister_device(struct cpuidle_device *dev) | |||
354 | 354 | ||
355 | cpuidle_disable_device(dev); | 355 | cpuidle_disable_device(dev); |
356 | 356 | ||
357 | cpuidle_remove_sysfs(sys_dev); | 357 | cpuidle_remove_sysfs(cpu_dev); |
358 | list_del(&dev->device_list); | 358 | list_del(&dev->device_list); |
359 | wait_for_completion(&dev->kobj_unregister); | 359 | wait_for_completion(&dev->kobj_unregister); |
360 | per_cpu(cpuidle_devices, dev->cpu) = NULL; | 360 | per_cpu(cpuidle_devices, dev->cpu) = NULL; |
@@ -411,7 +411,7 @@ static int __init cpuidle_init(void) | |||
411 | if (cpuidle_disabled()) | 411 | if (cpuidle_disabled()) |
412 | return -ENODEV; | 412 | return -ENODEV; |
413 | 413 | ||
414 | ret = cpuidle_add_class_sysfs(&cpu_sysdev_class); | 414 | ret = cpuidle_add_interface(cpu_subsys.dev_root); |
415 | if (ret) | 415 | if (ret) |
416 | return ret; | 416 | return ret; |
417 | 417 | ||