diff options
author | Lachlan McIlroy <lachlan@redback.melbourne.sgi.com> | 2008-02-25 22:26:14 -0500 |
---|---|---|
committer | Lachlan McIlroy <lachlan@redback.melbourne.sgi.com> | 2008-02-25 22:26:14 -0500 |
commit | 91e229bbad6524aabaac8717b2f559283670c37a (patch) | |
tree | 84a55e4ac2dcf23add97bd9fde3e9cb232c12b30 /drivers/acpi/processor_core.c | |
parent | 6e5e93424dc66542c548dfaa3bfebe30d46d50dd (diff) | |
parent | bfa274e2436fc7ef72ef51c878083647f1cfd429 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 into for-linus
Diffstat (limited to 'drivers/acpi/processor_core.c')
-rw-r--r-- | drivers/acpi/processor_core.c | 39 |
1 files changed, 22 insertions, 17 deletions
diff --git a/drivers/acpi/processor_core.c b/drivers/acpi/processor_core.c index 75ccf5d18bf4..a3cc8a98255c 100644 --- a/drivers/acpi/processor_core.c +++ b/drivers/acpi/processor_core.c | |||
@@ -670,21 +670,26 @@ static int __cpuinit acpi_processor_start(struct acpi_device *device) | |||
670 | 670 | ||
671 | pr->cdev = thermal_cooling_device_register("Processor", device, | 671 | pr->cdev = thermal_cooling_device_register("Processor", device, |
672 | &processor_cooling_ops); | 672 | &processor_cooling_ops); |
673 | if (pr->cdev) | 673 | if (IS_ERR(pr->cdev)) { |
674 | result = PTR_ERR(pr->cdev); | ||
675 | goto end; | ||
676 | } | ||
677 | if (pr->cdev) { | ||
674 | printk(KERN_INFO PREFIX | 678 | printk(KERN_INFO PREFIX |
675 | "%s is registered as cooling_device%d\n", | 679 | "%s is registered as cooling_device%d\n", |
676 | device->dev.bus_id, pr->cdev->id); | 680 | device->dev.bus_id, pr->cdev->id); |
677 | else | ||
678 | goto end; | ||
679 | 681 | ||
680 | result = sysfs_create_link(&device->dev.kobj, &pr->cdev->device.kobj, | 682 | result = sysfs_create_link(&device->dev.kobj, |
681 | "thermal_cooling"); | 683 | &pr->cdev->device.kobj, |
682 | if (result) | 684 | "thermal_cooling"); |
683 | return result; | 685 | if (result) |
684 | result = sysfs_create_link(&pr->cdev->device.kobj, &device->dev.kobj, | 686 | return result; |
685 | "device"); | 687 | result = sysfs_create_link(&pr->cdev->device.kobj, |
686 | if (result) | 688 | &device->dev.kobj, |
687 | return result; | 689 | "device"); |
690 | if (result) | ||
691 | return result; | ||
692 | } | ||
688 | 693 | ||
689 | if (pr->flags.throttling) { | 694 | if (pr->flags.throttling) { |
690 | printk(KERN_INFO PREFIX "%s [%s] (supports", | 695 | printk(KERN_INFO PREFIX "%s [%s] (supports", |
@@ -809,10 +814,12 @@ static int acpi_processor_remove(struct acpi_device *device, int type) | |||
809 | 814 | ||
810 | acpi_processor_remove_fs(device); | 815 | acpi_processor_remove_fs(device); |
811 | 816 | ||
812 | sysfs_remove_link(&device->dev.kobj, "thermal_cooling"); | 817 | if (pr->cdev) { |
813 | sysfs_remove_link(&pr->cdev->device.kobj, "device"); | 818 | sysfs_remove_link(&device->dev.kobj, "thermal_cooling"); |
814 | thermal_cooling_device_unregister(pr->cdev); | 819 | sysfs_remove_link(&pr->cdev->device.kobj, "device"); |
815 | pr->cdev = NULL; | 820 | thermal_cooling_device_unregister(pr->cdev); |
821 | pr->cdev = NULL; | ||
822 | } | ||
816 | 823 | ||
817 | processors[pr->id] = NULL; | 824 | processors[pr->id] = NULL; |
818 | 825 | ||
@@ -826,8 +833,6 @@ static int acpi_processor_remove(struct acpi_device *device, int type) | |||
826 | * Acpi processor hotplug support * | 833 | * Acpi processor hotplug support * |
827 | ****************************************************************************/ | 834 | ****************************************************************************/ |
828 | 835 | ||
829 | static int is_processor_present(acpi_handle handle); | ||
830 | |||
831 | static int is_processor_present(acpi_handle handle) | 836 | static int is_processor_present(acpi_handle handle) |
832 | { | 837 | { |
833 | acpi_status status; | 838 | acpi_status status; |