|
@@ -734,19 +734,21 @@ static void acpi_video_device_find_cap(struct acpi_video_device *device)
|
|
if (IS_ERR(device->cdev))
|
|
if (IS_ERR(device->cdev))
|
|
return;
|
|
return;
|
|
|
|
|
|
- printk(KERN_INFO PREFIX
|
|
|
|
- "%s is registered as cooling_device%d\n",
|
|
|
|
- device->dev->dev.bus_id, device->cdev->id);
|
|
|
|
- result = sysfs_create_link(&device->dev->dev.kobj,
|
|
|
|
- &device->cdev->device.kobj,
|
|
|
|
- "thermal_cooling");
|
|
|
|
- if (result)
|
|
|
|
- printk(KERN_ERR PREFIX "Create sysfs link\n");
|
|
|
|
- result = sysfs_create_link(&device->cdev->device.kobj,
|
|
|
|
- &device->dev->dev.kobj,
|
|
|
|
- "device");
|
|
|
|
- if (result)
|
|
|
|
- printk(KERN_ERR PREFIX "Create sysfs link\n");
|
|
|
|
|
|
+ if (device->cdev) {
|
|
|
|
+ printk(KERN_INFO PREFIX
|
|
|
|
+ "%s is registered as cooling_device%d\n",
|
|
|
|
+ device->dev->dev.bus_id, device->cdev->id);
|
|
|
|
+ result = sysfs_create_link(&device->dev->dev.kobj,
|
|
|
|
+ &device->cdev->device.kobj,
|
|
|
|
+ "thermal_cooling");
|
|
|
|
+ if (result)
|
|
|
|
+ printk(KERN_ERR PREFIX "Create sysfs link\n");
|
|
|
|
+ result = sysfs_create_link(&device->cdev->device.kobj,
|
|
|
|
+ &device->dev->dev.kobj,
|
|
|
|
+ "device");
|
|
|
|
+ if (result)
|
|
|
|
+ printk(KERN_ERR PREFIX "Create sysfs link\n");
|
|
|
|
+ }
|
|
}
|
|
}
|
|
if (device->cap._DCS && device->cap._DSS){
|
|
if (device->cap._DCS && device->cap._DSS){
|
|
static int count = 0;
|
|
static int count = 0;
|