Adrien Schildknecht aecbd9b1bf ACPI / video: driver must be registered before checking for keypresses
acpi_video_handles_brightness_key_presses() may use an uninitialized mutex.
The error has been reported by lockdep: DEBUG_LOCKS_WARN_ON(l->magic != l).
The function assumes that the video driver has been registered before being
called. As explained in the comment of acpi_video_init(), the registration
of the video class may be defered and thus may not take place in the init
function of the module.

Use completion mechanisms to make sure that
acpi_video_handles_brightness_key_presses() wait for the completion of
acpi_video_register() before using the mutex.
Also get rid of register_count since task completion can replace it.

Signed-off-by: Adrien Schildknecht <adrien+dev@schischi.me>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2016-01-05 13:38:50 +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