diff options
author | Len Brown <len.brown@intel.com> | 2011-03-23 02:34:54 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2011-03-23 02:34:54 -0400 |
commit | 02e2407858fd62053bf60349c0e72cd1c7a4a60e (patch) | |
tree | 0ebdbddc97d3abbc675916010e7771065b70c137 /drivers/acpi/video.c | |
parent | 96e1c408ea8a556c5b51e0e7d56bd2afbfbf5fe9 (diff) | |
parent | 6447f55da90b77faec1697d499ed7986bb4f6de6 (diff) | |
download | linux-02e2407858fd62053bf60349c0e72cd1c7a4a60e.tar.bz2 |
Merge branch 'linus' into release
Conflicts:
arch/x86/kernel/acpi/sleep.c
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/video.c')
-rw-r--r-- | drivers/acpi/video.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c index 90f8f7676d1f..a18e497f1c3c 100644 --- a/drivers/acpi/video.c +++ b/drivers/acpi/video.c @@ -782,6 +782,9 @@ static void acpi_video_device_find_cap(struct acpi_video_device *device) if (acpi_video_backlight_support()) { struct backlight_properties props; + struct pci_dev *pdev; + acpi_handle acpi_parent; + struct device *parent = NULL; int result; static int count = 0; char *name; @@ -794,9 +797,20 @@ static void acpi_video_device_find_cap(struct acpi_video_device *device) return; count++; + acpi_get_parent(device->dev->handle, &acpi_parent); + + pdev = acpi_get_pci_dev(acpi_parent); + if (pdev) { + parent = &pdev->dev; + pci_dev_put(pdev); + } + memset(&props, 0, sizeof(struct backlight_properties)); + props.type = BACKLIGHT_FIRMWARE; props.max_brightness = device->brightness->count - 3; - device->backlight = backlight_device_register(name, NULL, device, + device->backlight = backlight_device_register(name, + parent, + device, &acpi_backlight_ops, &props); kfree(name); |