From: Len Brown Date: Thu, 7 Feb 2008 08:18:04 +0000 (-0500) Subject: Merge branches 'release' and 'menlo' into release X-Git-Tag: v2.6.25-rc1~297^2~3^2~2^2~1 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=26b6f2236615649a0ae6a0de2e9e71a2f9ffeba7;p=linux-2.6 Merge branches 'release' and 'menlo' into release Conflicts: drivers/acpi/video.c Signed-off-by: Len Brown --- 26b6f2236615649a0ae6a0de2e9e71a2f9ffeba7 diff --cc drivers/acpi/video.c index a54ff6bce8,a54ff6bce8,eab9c4213b..82815cff15 --- a/drivers/acpi/video.c +++ b/drivers/acpi/video.c @@@@ -660,6 -660,6 -702,8 +710,7 @@@@ static void acpi_video_device_find_cap( kfree(obj); if (device->cap._BCL && device->cap._BCM && device->cap._BQC && max_level > 0){ - unsigned long tmp; ++ int result; static int count = 0; char *name; name = kzalloc(MAX_NAME_LEN, GFP_KERNEL); @@@@ -667,13 -667,13 -711,31 +718,30 @@@@ return; sprintf(name, "acpi_video%d", count++); - acpi_video_device_lcd_get_level_current(device, &tmp); device->backlight = backlight_device_register(name, NULL, device, &acpi_backlight_ops); - device->backlight->props.max_brightness = max_level; - device->backlight->props.brightness = (int)tmp; + device->backlight->props.max_brightness = device->brightness->count-3; + device->backlight->props.brightness = acpi_video_get_brightness(device->backlight); backlight_update_status(device->backlight); -- kfree(name); ++ ++ device->cdev = thermal_cooling_device_register("LCD", ++ device->dev, &video_cooling_ops); ++ 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){ static int count = 0;