ACPI / video: Fix using an uninitialized mutex / list_head in acpi_video_handles_brig...
authorHans de Goede <hdegoede@redhat.com>
Thu, 14 Jan 2016 08:41:46 +0000 (09:41 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 15 Jan 2016 21:09:07 +0000 (22:09 +0100)
commit14e9355363fc5bf98ba63875e117f29d1902d253
tree69459db928537e417a1e289c5c198dc20762a73e
parent970530cd00578d9dd9de45ecf297b28f6809c738
ACPI / video: Fix using an uninitialized mutex / list_head in acpi_video_handles_brightness_key_presses()

If acpi_video_handles_brightness_key_presses() was called before
acpi_video_register(), it would use the video_list mutex / list_head
uninitialized.

This patch fixes this by using DEFINE_MUTEX / LIST_HEAD when declaring
these, instead of initializing them runtime from acpi_video_register().

Fixes: 90b066b15eda "ACPI / video: Add a acpi_video_handles_brightness_key_presses() helper"
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/acpi_video.c