Commit 52304886 authored by Hans de Goede's avatar Hans de Goede Committed by Rafael J. Wysocki

ACPI: video: Add comment about acpi_video_backlight_use_native() usage

Add a comment explaining that acpi_video_backlight_use_native() MUST
only be used by GPU drivers and that it must NOT be used on other places.
Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent c9369549
......@@ -75,6 +75,15 @@ static inline enum acpi_backlight_type acpi_video_get_backlight_type(void)
return __acpi_video_get_backlight_type(false, NULL);
}
/*
* This function MUST only be called by GPU drivers to check if the driver
* should register a backlight class device. This function not only checks
* if a GPU native backlight device should be registered it *also* tells
* the ACPI video-detect code that native GPU backlight control is available.
* Therefor calling this from any place other then the GPU driver is wrong!
* To check if GPU native backlight control is used in other places instead use:
* if (acpi_video_get_backlight_type() == acpi_backlight_native) { ... }
*/
static inline bool acpi_video_backlight_use_native(void)
{
return __acpi_video_get_backlight_type(true, NULL) == acpi_backlight_native;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment