]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
platform/x86: acer-wmi: setup accelerometer when ACPI device was found
authorLee, Chun-Yi <joeyli.kernel@gmail.com>
Fri, 28 Apr 2017 08:23:59 +0000 (16:23 +0800)
committerJiri Slaby <jslaby@suse.cz>
Tue, 9 May 2017 06:19:25 +0000 (08:19 +0200)
commit803bef975326b78e1bdaa69f33f1b17f7ab4dc68
treee770d1aa54539605523a11d94204872426bab8bd
parentd8d98430e95edda0ef2e2be92dcf486e56a71fca
platform/x86: acer-wmi: setup accelerometer when ACPI device was found

commit f9ac89f5ad613b462339e845aeb8494646fd9be2 upstream.

The 98d610c3739a patch was introduced since v4.11-rc1 that it causes
that the accelerometer input device will not be created on workable
machines because the HID string comparing logic is wrong.

And, the patch doesn't prevent that the accelerometer input device
be created on the machines that have no BST0001. That's because
the acpi_get_devices() returns success even it didn't find any
match device.

This patch fixed the HID string comparing logic of BST0001 device.
And, it also makes sure that the acpi_get_devices() returns
acpi_handle for BST0001.

Fixes: 98d610c3739a ("acer-wmi: setup accelerometer when machine has appropriate notify event")
Reference: https://bugzilla.kernel.org/show_bug.cgi?id=193761
Reported-by: Samuel Sieb <samuel-kbugs@sieb.net>
Signed-off-by: "Lee, Chun-Yi" <jlee@suse.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
drivers/platform/x86/acer-wmi.c