Hans de Goede 90b066b15e ACPI / video: Add a acpi_video_handles_brightness_key_presses() helper
Several drivers want to know if the acpi-video is generating key-presses
for brightness change hotkeys to avoid sending double key-events to
userspace for these. Currently these driver use this construct for this:

	if (acpi_video_get_backlight_type() == acpi_backlight_vendor)
		report_brightness_key_event();

This indirect way of detecting if acpi-video is active does not make the
code easier to understand, and in some cases it is wrong because just
because the preferred type != vendor does not mean that acpi-video is
actually listening for brightness events, e.g. there may be no acpi-video
bus on the system at all.

This commit adds a acpi_video_handles_brightness_key_presses() helper
function, making the code needing this functionality both easier to read
and more correct.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2016-01-01 03:14:51 +01:00
..
2015-07-08 02:27:32 +02:00
2015-07-20 10:52:45 -07:00
2015-07-08 02:27:32 +02:00
2015-07-08 02:27:32 +02:00
2015-07-08 02:27:32 +02:00
2015-07-08 02:27:32 +02:00
2015-07-08 02:27:32 +02:00
2015-07-08 02:27:32 +02:00
2015-07-08 02:27:32 +02:00
2015-07-08 02:27:32 +02:00
2015-11-07 01:30:10 +01:00
2015-10-13 19:01:25 +02:00
2015-07-08 02:27:32 +02:00
2015-11-04 21:50:37 -08:00
2015-07-08 02:27:32 +02:00
2015-11-06 14:22:15 -08:00
2015-07-08 02:27:32 +02:00
2015-09-01 03:38:43 +02:00
2015-09-01 15:52:35 +02:00
2015-07-08 02:27:32 +02:00
2015-11-07 01:30:10 +01:00
2015-11-02 00:52:19 +01:00
2015-07-08 02:27:32 +02:00