Browse files

Still use ACPI backlight control if _DOS doesn't exist

This is a regression introduced by commit
ea9f885

https://bugzilla.kernel.org/show_bug.cgi?id=43168

Some platforms don't have _DOS control method, but the ACPI
backlight still works.
We do not want to lose the backlight control ability on these platforms.

CC : Igor Murzov <intergalactic.anonymous@gmail.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
  • Loading branch information...
1 parent 177fece commit 4a6d6f5047c3003d61bf20fe9ad31c9573ff74ab @zhang-rui zhang-rui committed with heftig Jul 4, 2012
Showing with 8 additions and 2 deletions.
  1. +8 −2 drivers/acpi/video.c
View
10 drivers/acpi/video.c
@@ -567,8 +567,14 @@ acpi_video_bus_DOS(struct acpi_video_bus *video, int bios_flag, int lcd_flag)
video->dos_setting = arg0.integer.value;
status = acpi_evaluate_object(video->device->handle, "_DOS",
&args, NULL);
- if (ACPI_FAILURE(status))
- return -EIO;
+ if (ACPI_FAILURE(status)) {
+ /*
+ * some platforms don't have _DOS, but the ACPI
+ * backlight control still works
+ */
+ ACPI_DEBUG_PRINT((ACPI_DB_INFO, "No _DOS\n"));
+ return 0;
+ }
return 0;
}

0 comments on commit 4a6d6f5

Please sign in to comment.