Skip to content

Commit a599a0f

Browse files
andy-shevgregkh
authored andcommitted
usb: core: Add ACPI support for USB interface devices
Currently on ACPI-enabled systems the USB interface device has no link to the actual firmware node and thus drivers may not parse additional information given in the table. The new feature, proposed here, allows to pass properties or other information to the drivers. The ACPI companion of the device has to be set for USB interface devices to achieve above. Use ACPI_COMPANION_SET macro to set this. Note, OF already does link of_node and this is the same for ACPI case. Signed-off-by: Andy Shevchenko <[email protected]> Reviewed-by: Rafael J. Wysocki <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent fd78901 commit a599a0f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/usb/core/message.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
* Released under the GPLv2 only.
66
*/
77

8+
#include <linux/acpi.h>
89
#include <linux/pci.h> /* for scatterlist macros */
910
#include <linux/usb.h>
1011
#include <linux/module.h>
@@ -1941,6 +1942,7 @@ int usb_set_configuration(struct usb_device *dev, int configuration)
19411942
intf->dev.of_node = usb_of_get_interface_node(dev,
19421943
configuration, ifnum);
19431944
}
1945+
ACPI_COMPANION_SET(&intf->dev, ACPI_COMPANION(&dev->dev));
19441946
intf->dev.driver = NULL;
19451947
intf->dev.bus = &usb_bus_type;
19461948
intf->dev.type = &usb_if_device_type;

0 commit comments

Comments
 (0)