From 50372073d2919480fb32d56cb3b91663b9fca0f1 Mon Sep 17 00:00:00 2001 From: Mike Lockwood Date: Mon, 13 Dec 2010 10:15:25 -0800 Subject: libusbhost: Add accessor for the USB device descriptor Change-Id: Ic3a54e2a06f3b4fa72f99b64025a911fbf525daf Signed-off-by: Mike Lockwood --- libusbhost/usbhost.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'libusbhost') diff --git a/libusbhost/usbhost.c b/libusbhost/usbhost.c index 93c6dd3a8..6bdeebf23 100644 --- a/libusbhost/usbhost.c +++ b/libusbhost/usbhost.c @@ -325,6 +325,11 @@ uint16_t usb_device_get_product_id(struct usb_device *device) return __le16_to_cpu(desc->idProduct); } +const struct usb_device_descriptor* usb_device_get_device_descriptor(struct usb_device *device) +{ + return (struct usb_device_descriptor*)device->desc; +} + int usb_device_send_control(struct usb_device *device, int requestType, int request, -- cgit v1.2.3