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

Collapse All | Expand All

(-)a/drivers/acpi/video.c (-2 / +10 lines)
Lines 594-599 acpi_video_device_lcd_get_level_current(struct acpi_video_device *device, Link Here
594
					unsigned long long *level)
594
					unsigned long long *level)
595
{
595
{
596
	acpi_status status = AE_OK;
596
	acpi_status status = AE_OK;
597
	int i;
597
598
598
	if (device->cap._BQC || device->cap._BCQ) {
599
	if (device->cap._BQC || device->cap._BCQ) {
599
		char *buf = device->cap._BQC ? "_BQC" : "_BCQ";
600
		char *buf = device->cap._BQC ? "_BQC" : "_BCQ";
Lines 609-616 acpi_video_device_lcd_get_level_current(struct acpi_video_device *device, Link Here
609
610
610
			}
611
			}
611
			*level += bqc_offset_aml_bug_workaround;
612
			*level += bqc_offset_aml_bug_workaround;
612
			device->brightness->curr = *level;
613
 			for (i = 2; i < device->brightness->count; i++)
613
			return 0;
614
 			        if (device->brightness->levels[i] == *level) {
615
 				        device->brightness->curr = *level;
616
 			                return 0;
617
 			        }
618
 			/* BQC returned an invalid level. Stop using it.  */
619
 			ACPI_WARNING((AE_INFO, "%s returned an invalid level",
620
 				      buf));
621
 			device->cap._BQC = device->cap._BCQ = 0;
614
		} else {
622
		} else {
615
			/* Fixme:
623
			/* Fixme:
616
			 * should we return an error or ignore this failure?
624
			 * should we return an error or ignore this failure?

Return to bug 13511