diff options
| author | Hans de Goede <[email protected]> | 2017-09-11 14:07:06 +0000 |
|---|---|---|
| committer | Rafael J. Wysocki <[email protected]> | 2017-11-08 23:30:44 +0000 |
| commit | 84d3f6b76447896919c63b28ad71f71238cefcce (patch) | |
| tree | 0ee00fa0c6532ba48342e55011e38b972774a79c /drivers/tty/serial/sccnxp.c | |
| parent | Linux 4.14-rc8 (diff) | |
| download | kernel-84d3f6b76447896919c63b28ad71f71238cefcce.tar.gz kernel-84d3f6b76447896919c63b28ad71f71238cefcce.zip | |
ACPI / button: Delay acpi_lid_initialize_state() until first user space open
ACPI _LID methods may depend on OpRegions and do not always handle
handlers for those OpRegions not being present properly e.g. :
Method (_LID, 0, NotSerialized) // _LID: Lid Status
{
If ((^^I2C5.PMI1.AVBL == One) && (^^GPO2.AVBL == One))
{
Return (^^GPO2.LPOL) /* \_SB_.GPO2.LPOL */
}
}
Note the missing Return (1) when either of the OpRegions is not available,
this causes (in this case) a report of the lid-switch being closed,
which causes userspace to do an immediate suspend at boot.
This commit delays getting the initial state and thus calling _LID for
the first time until userspace opens the /dev/input/event# node. This
ensures that all drivers will have had a chance to load and registerer
their OpRegions before the first _LID call, fixing this issue.
Signed-off-by: Hans de Goede <[email protected]>
Signed-off-by: Rafael J. Wysocki <[email protected]>
Diffstat (limited to 'drivers/tty/serial/sccnxp.c')
0 files changed, 0 insertions, 0 deletions
