diff options
author | Takashi Iwai <tiwai@suse.de> | 2010-01-19 09:53:43 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2010-01-19 09:53:43 -0500 |
commit | 9e4c84967ef027fe50a03cf48dd6da9519c8e60c (patch) | |
tree | 21d6b8168670f22521f3bb703e3b9d1932566c1c /drivers/acpi/video.c | |
parent | d2f2fcd2541bae004db7f4798ffd9d2cb75ae817 (diff) | |
parent | 3fb4a508b8e7957aa899f32cd6d9d462e102c7ca (diff) |
Merge branch 'fix/hda' into topic/hda
Conflicts:
sound/pci/hda/patch_realtek.c
Diffstat (limited to 'drivers/acpi/video.c')
-rw-r--r-- | drivers/acpi/video.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c index 05dff631591c..72e76b4b6538 100644 --- a/drivers/acpi/video.c +++ b/drivers/acpi/video.c | |||
@@ -999,8 +999,10 @@ static void acpi_video_device_find_cap(struct acpi_video_device *device) | |||
999 | sprintf(name, "acpi_video%d", count++); | 999 | sprintf(name, "acpi_video%d", count++); |
1000 | device->backlight = backlight_device_register(name, | 1000 | device->backlight = backlight_device_register(name, |
1001 | NULL, device, &acpi_backlight_ops); | 1001 | NULL, device, &acpi_backlight_ops); |
1002 | device->backlight->props.max_brightness = device->brightness->count-3; | ||
1003 | kfree(name); | 1002 | kfree(name); |
1003 | if (IS_ERR(device->backlight)) | ||
1004 | return; | ||
1005 | device->backlight->props.max_brightness = device->brightness->count-3; | ||
1004 | 1006 | ||
1005 | result = sysfs_create_link(&device->backlight->dev.kobj, | 1007 | result = sysfs_create_link(&device->backlight->dev.kobj, |
1006 | &device->dev->dev.kobj, "device"); | 1008 | &device->dev->dev.kobj, "device"); |
@@ -1979,6 +1981,10 @@ acpi_video_switch_brightness(struct acpi_video_device *device, int event) | |||
1979 | unsigned long long level_current, level_next; | 1981 | unsigned long long level_current, level_next; |
1980 | int result = -EINVAL; | 1982 | int result = -EINVAL; |
1981 | 1983 | ||
1984 | /* no warning message if acpi_backlight=vendor is used */ | ||
1985 | if (!acpi_video_backlight_support()) | ||
1986 | return 0; | ||
1987 | |||
1982 | if (!device->brightness) | 1988 | if (!device->brightness) |
1983 | goto out; | 1989 | goto out; |
1984 | 1990 | ||