View | Details | Raw Unified | Return to bug 104121 | Differences between
and this patch

Collapse All | Expand All

(-)a/drivers/acpi/acpi_video.c (-12 / +18 lines)
Lines 1568-1582 static void acpi_video_dev_register_backlight(struct acpi_video_device *device) Link Here
1568
	static int count;
1568
	static int count;
1569
	char *name;
1569
	char *name;
1570
1570
1571
	/*
1572
	 * Do not create backlight device for video output
1573
	 * device that is not in the enumerated list.
1574
	 */
1575
	if (!acpi_video_device_in_dod(device)) {
1576
		dev_dbg(&device->dev->dev, "not in _DOD list, ignore\n");
1577
		return;
1578
	}
1579
1580
	result = acpi_video_init_brightness(device);
1571
	result = acpi_video_init_brightness(device);
1581
	if (result)
1572
	if (result)
1582
		return;
1573
		return;
Lines 1657-1662 static void acpi_video_run_bcl_for_osi(struct acpi_video_bus *video) Link Here
1657
	mutex_unlock(&video->device_list_lock);
1648
	mutex_unlock(&video->device_list_lock);
1658
}
1649
}
1659
1650
1651
static bool acpi_video_should_register_backlight(struct acpi_video_device *dev)
1652
{
1653
	/*
1654
	 * Do not create backlight device for video output
1655
	 * device that is not in the enumerated list.
1656
	 */
1657
	if (!acpi_video_device_in_dod(device)) {
1658
		dev_dbg(&device->dev->dev, "not in _DOD list, ignore\n");
1659
		return false;
1660
	}
1661
1662
	return dev->flags.lcd;
1663
}
1664
1660
static int acpi_video_bus_register_backlight(struct acpi_video_bus *video)
1665
static int acpi_video_bus_register_backlight(struct acpi_video_bus *video)
1661
{
1666
{
1662
	struct acpi_video_device *dev;
1667
	struct acpi_video_device *dev;
Lines 1670-1677 static int acpi_video_bus_register_backlight(struct acpi_video_bus *video) Link Here
1670
		return 0;
1675
		return 0;
1671
1676
1672
	mutex_lock(&video->device_list_lock);
1677
	mutex_lock(&video->device_list_lock);
1673
	list_for_each_entry(dev, &video->video_device_list, entry)
1678
	list_for_each_entry(dev, &video->video_device_list, entry) {
1674
		acpi_video_dev_register_backlight(dev);
1679
		if (acpi_video_should_register_backlight(dev))
1680
			acpi_video_dev_register_backlight(dev);
1681
	}
1675
	mutex_unlock(&video->device_list_lock);
1682
	mutex_unlock(&video->device_list_lock);
1676
1683
1677
	video->backlight_registered = true;
1684
	video->backlight_registered = true;
1678
- 

Return to bug 104121