diff options
author | dmitry.torokhov@gmail.com <dmitry.torokhov@gmail.com> | 2020-10-05 08:11:25 +0300 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2020-10-05 14:22:54 +0300 |
commit | 21988a8e51479ceffe7b0568b170effabb708dfe (patch) | |
tree | b5e7e7a4d9ae37ceae564e5aef14b0dc475b3a6b /COPYING | |
parent | 549738f15da0e5a00275977623be199fbbf7df50 (diff) | |
download | linux-21988a8e51479ceffe7b0568b170effabb708dfe.tar.xz |
ACPI: button: fix handling lid state changes when input device closed
The original intent of 84d3f6b76447 was to delay evaluating lid state until
all drivers have been loaded, with input device being opened from userspace
serving as a signal for this condition. Let's ensure that state updates
happen even if userspace closed (or in the future inhibited) input device.
Note that if we go through suspend/resume cycle we assume the system has
been fully initialized even if LID input device has not been opened yet.
This has a side-effect of fixing access to input->users outside of
input->mutex protections by the way of eliminating said accesses and using
driver private flag.
Fixes: 84d3f6b76447 ("ACPI / button: Delay acpi_lid_initialize_state() until first user space open")
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Cc: 4.15+ <stable@vger.kernel.org> # 4.15+
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'COPYING')
0 files changed, 0 insertions, 0 deletions