Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 86114
b: refs/heads/master
c: 19b3678
h: refs/heads/master
v: v3
  • Loading branch information
Thomas Sujith authored and Len Brown committed Feb 15, 2008
1 parent 04f26f9 commit 5076353
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 13 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: 3e6fda5c1159823fc02463eceb564c8bfc0e7a0e
refs/heads/master: 19b36780ee7ddeb5080e3f1f858a83c4824f1fdc
30 changes: 18 additions & 12 deletions trunk/drivers/acpi/fan.c
Original file line number Diff line number Diff line change
Expand Up @@ -256,22 +256,28 @@ static int acpi_fan_add(struct acpi_device *device)

cdev = thermal_cooling_device_register("Fan", device,
&fan_cooling_ops);
if (cdev)
if (IS_ERR(cdev)) {
result = PTR_ERR(cdev);
goto end;
}
if (cdev) {
printk(KERN_INFO PREFIX
"%s is registered as cooling_device%d\n",
device->dev.bus_id, cdev->id);
else
goto end;
acpi_driver_data(device) = cdev;
result = sysfs_create_link(&device->dev.kobj, &cdev->device.kobj,
"thermal_cooling");
if (result)
return result;

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

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

result = acpi_fan_add_fs(device);
if (result)
Expand Down

0 comments on commit 5076353

Please sign in to comment.