Skip to content

Commit b81881b

Browse files
kaehndBenjamin Tissoires
authored andcommitted
HID: usbhid: Share USB device firmware node with child HID device
USB HID core now shares its fwnode with its child HID device. Since there can only be one HID device on a USB interface, it is redundant to specify a hid node under the USB device. This allows usb HID device drivers to be described in firmware and make use of device properties. Signed-off-by: Danny Kaehn <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Benjamin Tissoires <[email protected]>
1 parent 748fe43 commit b81881b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/hid/usbhid/hid-core.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
#include <linux/list.h>
2020
#include <linux/mm.h>
2121
#include <linux/mutex.h>
22+
#include <linux/property.h>
2223
#include <linux/spinlock.h>
2324
#include <asm/unaligned.h>
2425
#include <asm/byteorder.h>
@@ -1374,6 +1375,7 @@ static int usbhid_probe(struct usb_interface *intf, const struct usb_device_id *
13741375
hid->hiddev_report_event = hiddev_report_event;
13751376
#endif
13761377
hid->dev.parent = &intf->dev;
1378+
device_set_node(&hid->dev, dev_fwnode(&intf->dev));
13771379
hid->bus = BUS_USB;
13781380
hid->vendor = le16_to_cpu(dev->descriptor.idVendor);
13791381
hid->product = le16_to_cpu(dev->descriptor.idProduct);

0 commit comments

Comments
 (0)