summaryrefslogtreecommitdiff
path: root/drivers/usb/input/usbhid.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/input/usbhid.h')
-rw-r--r--drivers/usb/input/usbhid.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/usb/input/usbhid.h b/drivers/usb/input/usbhid.h
index 830107e5251f..0023f96d4294 100644
--- a/drivers/usb/input/usbhid.h
+++ b/drivers/usb/input/usbhid.h
@@ -80,5 +80,8 @@ struct usbhid_device {
};
+#define hid_to_usb_dev(hid_dev) \
+ container_of(hid_dev->dev->parent, struct usb_device, dev)
+
#endif