linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1] usb: core: Add ACPI support for USB interfaces
@ 2020-03-23 19:55 Andy Shevchenko
  2020-03-24  6:26 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 4+ messages in thread
From: Andy Shevchenko @ 2020-03-23 19:55 UTC (permalink / raw)
  To: Greg Kroah-Hartman, linux-usb, Rafael J. Wysocki, linux-acpi
  Cc: Andy Shevchenko

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@linux.intel.com>
---
 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;
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-03-24  9:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-23 19:55 [PATCH v1] usb: core: Add ACPI support for USB interfaces Andy Shevchenko
2020-03-24  6:26 ` Greg Kroah-Hartman
2020-03-24  9:00   ` Andy Shevchenko
2020-03-24  9:13     ` Greg Kroah-Hartman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).