Re: [PATCH v1] usb: core: Add ACPI support for USB interfaces

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

 



On Mon, Mar 23, 2020 at 09:55:43PM +0200, Andy Shevchenko wrote:
> The ACPI companion of the device has to be set for USB interfaces
> in order to read and attach the properties described in the ACPI table.
> Use ACPI_COMPANION_SET macro to set this.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
> ---
>  drivers/usb/core/message.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/usb/core/message.c b/drivers/usb/core/message.c
> index 5adf489428aa..d5f834f16993 100644
> --- a/drivers/usb/core/message.c
> +++ b/drivers/usb/core/message.c
> @@ -5,6 +5,7 @@
>   * Released under the GPLv2 only.
>   */
>  
> +#include <linux/acpi.h>
>  #include <linux/pci.h>	/* for scatterlist macros */
>  #include <linux/usb.h>
>  #include <linux/module.h>
> @@ -1941,6 +1942,7 @@ int usb_set_configuration(struct usb_device *dev, int configuration)
>  			intf->dev.of_node = usb_of_get_interface_node(dev,
>  					configuration, ifnum);
>  		}
> +		ACPI_COMPANION_SET(&intf->dev, ACPI_COMPANION(&dev->dev));
>  		intf->dev.driver = NULL;
>  		intf->dev.bus = &usb_bus_type;
>  		intf->dev.type = &usb_if_device_type;

And what does this "fix"?

Is this a new feature, what isn't working today without this change?

And if it is a fix, should it be backported to older kernels, how far?

greg k-h



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux