Re: [PATCH] serdev: Fix detection of UART devices on Apple machines.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Feb 11, 2020 at 11:47:23AM -0800, Ronald Tschalär wrote:
> On Apple devices the _CRS method returns an empty resource template, and
> the resource settings are instead provided by the _DSM method. But
> commit 33364d63c75d6182fa369cea80315cf1bb0ee38e (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@xxxxxxxxxxxxxxx> # 5.5
> Signed-off-by: Ronald Tschalär <ronald@xxxxxxxxxxxxx>
> ---
>  drivers/tty/serdev/core.c | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/drivers/tty/serdev/core.c b/drivers/tty/serdev/core.c
> index ce5309d00280..0f64a10ba51f 100644
> --- a/drivers/tty/serdev/core.c
> +++ b/drivers/tty/serdev/core.c
> @@ -18,6 +18,7 @@
>  #include <linux/sched.h>
>  #include <linux/serdev.h>
>  #include <linux/slab.h>
> +#include <linux/platform_data/x86/apple.h>

Why is this needed?  Just for the x86_apple_machine variable?

Why do we still have platform_data for new systems anymore?  Can't this
go into a much more generic location?  Like as an inline function?

thanks,

greg k-h



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux