Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 86115
b: refs/heads/master
c: d76628c
h: refs/heads/master
i:
  86113: 04f26f9
  86111: 2cde2cf
v: v3
  • Loading branch information
Thomas Sujith authored and Len Brown committed Feb 15, 2008
1 parent 5076353 commit 26b6761
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 16 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 19b36780ee7ddeb5080e3f1f858a83c4824f1fdc
refs/heads/master: d76628c67cdeebf84766a19c67c821c2e518baa4
37 changes: 22 additions & 15 deletions trunk/drivers/acpi/processor_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -670,21 +670,26 @@ static int __cpuinit acpi_processor_start(struct acpi_device *device)

pr->cdev = thermal_cooling_device_register("Processor", device,
&processor_cooling_ops);
if (pr->cdev)
if (IS_ERR(pr->cdev)) {
result = PTR_ERR(pr->cdev);
goto end;
}
if (pr->cdev) {
printk(KERN_INFO PREFIX
"%s is registered as cooling_device%d\n",
device->dev.bus_id, pr->cdev->id);
else
goto end;

result = sysfs_create_link(&device->dev.kobj, &pr->cdev->device.kobj,
"thermal_cooling");
if (result)
return result;
result = sysfs_create_link(&pr->cdev->device.kobj, &device->dev.kobj,
"device");
if (result)
return result;
result = sysfs_create_link(&device->dev.kobj,
&pr->cdev->device.kobj,
"thermal_cooling");
if (result)
return result;
result = sysfs_create_link(&pr->cdev->device.kobj,
&device->dev.kobj,
"device");
if (result)
return result;
}

if (pr->flags.throttling) {
printk(KERN_INFO PREFIX "%s [%s] (supports",
Expand Down Expand Up @@ -809,10 +814,12 @@ static int acpi_processor_remove(struct acpi_device *device, int type)

acpi_processor_remove_fs(device);

sysfs_remove_link(&device->dev.kobj, "thermal_cooling");
sysfs_remove_link(&pr->cdev->device.kobj, "device");
thermal_cooling_device_unregister(pr->cdev);
pr->cdev = NULL;
if (pr->cdev) {
sysfs_remove_link(&device->dev.kobj, "thermal_cooling");
sysfs_remove_link(&pr->cdev->device.kobj, "device");
thermal_cooling_device_unregister(pr->cdev);
pr->cdev = NULL;
}

processors[pr->id] = NULL;

Expand Down

0 comments on commit 26b6761

Please sign in to comment.