summaryrefslogtreecommitdiff
path: root/drivers/acpi/scan.c
diff options
context:
space:
mode:
authorAdrien Schildknecht <adrien+dev@schischi.me>2016-01-05 01:22:28 +0300
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2016-01-05 15:38:50 +0300
commitaecbd9b1bff6afbe349921b406b99d285b412820 (patch)
tree002e2aea096bdb9c1f335f37bfe2ff7c19547c37 /drivers/acpi/scan.c
parent49eb5208220a9eef7529decbdefd95e4b94a928b (diff)
downloadlinux-aecbd9b1bff6afbe349921b406b99d285b412820.tar.xz
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>
Diffstat (limited to 'drivers/acpi/scan.c')
0 files changed, 0 insertions, 0 deletions