aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/acpi/fan.c34
-rw-r--r--drivers/acpi/processor_core.c30
-rw-r--r--drivers/acpi/video.c28
3 files changed, 49 insertions, 43 deletions
diff --git a/drivers/acpi/fan.c b/drivers/acpi/fan.c
index 4d535c50d821..c8e3cba423ef 100644
--- a/drivers/acpi/fan.c
+++ b/drivers/acpi/fan.c
@@ -260,22 +260,24 @@ static int acpi_fan_add(struct acpi_device *device)
260 result = PTR_ERR(cdev); 260 result = PTR_ERR(cdev);
261 goto end; 261 goto end;
262 } 262 }
263 printk(KERN_INFO PREFIX 263 if (cdev) {
264 "%s is registered as cooling_device%d\n", 264 printk(KERN_INFO PREFIX
265 device->dev.bus_id, cdev->id); 265 "%s is registered as cooling_device%d\n",
266 266 device->dev.bus_id, cdev->id);
267 acpi_driver_data(device) = cdev; 267
268 result = sysfs_create_link(&device->dev.kobj, 268 acpi_driver_data(device) = cdev;
269 &cdev->device.kobj, 269 result = sysfs_create_link(&device->dev.kobj,
270 "thermal_cooling"); 270 &cdev->device.kobj,
271 if (result) 271 "thermal_cooling");
272 return result; 272 if (result)
273 273 return result;
274 result = sysfs_create_link(&cdev->device.kobj, 274
275 &device->dev.kobj, 275 result = sysfs_create_link(&cdev->device.kobj,
276 "device"); 276 &device->dev.kobj,
277 if (result) 277 "device");
278 return result; 278 if (result)
279 return result;
280 }
279 281
280 result = acpi_fan_add_fs(device); 282 result = acpi_fan_add_fs(device);
281 if (result) 283 if (result)
diff --git a/drivers/acpi/processor_core.c b/drivers/acpi/processor_core.c
index 3a136f6c66a3..36a68fa114e3 100644
--- a/drivers/acpi/processor_core.c
+++ b/drivers/acpi/processor_core.c
@@ -674,20 +674,22 @@ static int __cpuinit acpi_processor_start(struct acpi_device *device)
674 result = PTR_ERR(pr->cdev); 674 result = PTR_ERR(pr->cdev);
675 goto end; 675 goto end;
676 } 676 }
677 printk(KERN_INFO PREFIX 677 if (pr->cdev) {
678 "%s is registered as cooling_device%d\n", 678 printk(KERN_INFO PREFIX
679 device->dev.bus_id, pr->cdev->id); 679 "%s is registered as cooling_device%d\n",
680 680 device->dev.bus_id, pr->cdev->id);
681 result = sysfs_create_link(&device->dev.kobj, 681
682 &pr->cdev->device.kobj, 682 result = sysfs_create_link(&device->dev.kobj,
683 "thermal_cooling"); 683 &pr->cdev->device.kobj,
684 if (result) 684 "thermal_cooling");
685 return result; 685 if (result)
686 result = sysfs_create_link(&pr->cdev->device.kobj, 686 return result;
687 &device->dev.kobj, 687 result = sysfs_create_link(&pr->cdev->device.kobj,
688 "device"); 688 &device->dev.kobj,
689 if (result) 689 "device");
690 return result; 690 if (result)
691 return result;
692 }
691 693
692 if (pr->flags.throttling) { 694 if (pr->flags.throttling) {
693 printk(KERN_INFO PREFIX "%s [%s] (supports", 695 printk(KERN_INFO PREFIX "%s [%s] (supports",
diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c
index fe09b57de617..12fb44f16766 100644
--- a/drivers/acpi/video.c
+++ b/drivers/acpi/video.c
@@ -734,19 +734,21 @@ static void acpi_video_device_find_cap(struct acpi_video_device *device)
734 if (IS_ERR(device->cdev)) 734 if (IS_ERR(device->cdev))
735 return; 735 return;
736 736
737 printk(KERN_INFO PREFIX 737 if (device->cdev) {
738 "%s is registered as cooling_device%d\n", 738 printk(KERN_INFO PREFIX
739 device->dev->dev.bus_id, device->cdev->id); 739 "%s is registered as cooling_device%d\n",
740 result = sysfs_create_link(&device->dev->dev.kobj, 740 device->dev->dev.bus_id, device->cdev->id);
741 &device->cdev->device.kobj, 741 result = sysfs_create_link(&device->dev->dev.kobj,
742 "thermal_cooling"); 742 &device->cdev->device.kobj,
743 if (result) 743 "thermal_cooling");
744 printk(KERN_ERR PREFIX "Create sysfs link\n"); 744 if (result)
745 result = sysfs_create_link(&device->cdev->device.kobj, 745 printk(KERN_ERR PREFIX "Create sysfs link\n");
746 &device->dev->dev.kobj, 746 result = sysfs_create_link(&device->cdev->device.kobj,
747 "device"); 747 &device->dev->dev.kobj,
748 if (result) 748 "device");
749 printk(KERN_ERR PREFIX "Create sysfs link\n"); 749 if (result)
750 printk(KERN_ERR PREFIX "Create sysfs link\n");
751 }
750 } 752 }
751 if (device->cap._DCS && device->cap._DSS){ 753 if (device->cap._DCS && device->cap._DSS){
752 static int count = 0; 754 static int count = 0;