Skip to content

Commit a2fc3c8

Browse files
committed
ACPI: video: Drop backlight_device_get_by_type() call from acpi_video_get_backlight_type()
All x86/ACPI kms drivers which register native/BACKLIGHT_RAW type backlight devices call acpi_video_backlight_use_native() now. This sets __acpi_video_get_backlight_type()'s internal static native_available flag. This makes the backlight_device_get_by_type(BACKLIGHT_RAW) check unnecessary. Relying on the cached native_available value not only is simpler, it will also work correctly in cases where then native backlight registration was skipped because of acpi_video_backlight_use_native() returning false. Acked-by: Rafael J. Wysocki <[email protected]> Signed-off-by: Hans de Goede <[email protected]>
1 parent 7f908d3 commit a2fc3c8

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/acpi/video_detect.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -608,8 +608,7 @@ static enum acpi_backlight_type __acpi_video_get_backlight_type(bool native)
608608
if (!(video_caps & ACPI_VIDEO_BACKLIGHT))
609609
return acpi_backlight_vendor;
610610

611-
if (acpi_osi_is_win8() &&
612-
(native_available || backlight_device_get_by_type(BACKLIGHT_RAW)))
611+
if (acpi_osi_is_win8() && native_available)
613612
return acpi_backlight_native;
614613

615614
return acpi_backlight_video;

0 commit comments

Comments
 (0)