]> git.baikalelectronics.ru Git - kernel.git/commit
serdev: Fix detection of UART devices on Apple machines.
authorRonald Tschalär <ronald@innovation.ch>
Tue, 11 Feb 2020 19:47:23 +0000 (11:47 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 6 Mar 2020 13:10:44 +0000 (14:10 +0100)
commitc6e9e0be1e0279fbf6b41c66667df2e6fa8a38b9
treeed9eb37041cfec3d57f82294e6a7769539c3ecf5
parent100cbde951a63f12114009ccb8376d7113580ee2
serdev: Fix detection of UART devices on Apple machines.

On Apple devices the _CRS method returns an empty resource template, and
the resource settings are instead provided by the _DSM method. But
commit fb668f696db3d9cc65723c1f3d5352e4f2cd8a33 (serdev: Add ACPI
devices by ResourceSource field) changed the search for serdev devices
to require valid, non-empty resource template, thereby breaking Apple
devices and causing bluetooth devices to not be found.

This expands the check so that if we don't find a valid template, and
we're on an Apple machine, then just check for the device being an
immediate child of the controller and having a "baud" property.

Cc: <stable@vger.kernel.org> # 5.5
Fixes: fb668f696db3 ("serdev: Add ACPI devices by ResourceSource field")
Signed-off-by: Ronald Tschalär <ronald@innovation.ch>
Link: https://lore.kernel.org/r/20200211194723.486217-1-ronald@innovation.ch
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serdev/core.c