diff options
-rw-r--r-- | sys/dev/usb/usb_subr.c | 4 | ||||
-rw-r--r-- | sys/dev/usb/usbdivar.h | 4 | ||||
-rw-r--r-- | sys/dev/usb/uvideo.c | 9 |
3 files changed, 10 insertions, 7 deletions
diff --git a/sys/dev/usb/usb_subr.c b/sys/dev/usb/usb_subr.c index 589eb55777e..558e393fa10 100644 --- a/sys/dev/usb/usb_subr.c +++ b/sys/dev/usb/usb_subr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: usb_subr.c,v 1.134 2017/04/08 02:57:25 deraadt Exp $ */ +/* $OpenBSD: usb_subr.c,v 1.135 2018/04/24 17:22:33 landry Exp $ */ /* $NetBSD: usb_subr.c,v 1.103 2003/01/10 11:19:13 augustss Exp $ */ /* $FreeBSD: src/sys/dev/usb/usb_subr.c,v 1.18 1999/11/17 22:33:47 n_hibma Exp $ */ @@ -61,8 +61,6 @@ extern int usbdebug; usbd_status usbd_set_config(struct usbd_device *, int); void usbd_devinfo(struct usbd_device *, int, char *, size_t); -void usbd_devinfo_vp(struct usbd_device *, char *, size_t, - char *, size_t, int); char *usbd_get_device_string(struct usbd_device *, uByte); char *usbd_get_string(struct usbd_device *, int, char *, size_t); int usbd_getnewaddr(struct usbd_bus *); diff --git a/sys/dev/usb/usbdivar.h b/sys/dev/usb/usbdivar.h index cc653bc5c28..42f7974e90b 100644 --- a/sys/dev/usb/usbdivar.h +++ b/sys/dev/usb/usbdivar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: usbdivar.h,v 1.73 2018/02/03 13:37:37 mpi Exp $ */ +/* $OpenBSD: usbdivar.h,v 1.74 2018/04/24 17:22:33 landry Exp $ */ /* $NetBSD: usbdivar.h,v 1.70 2002/07/11 21:14:36 augustss Exp $ */ /* $FreeBSD: src/sys/dev/usb/usbdivar.h,v 1.11 1999/11/17 22:33:51 n_hibma Exp $ */ @@ -257,6 +257,8 @@ usbd_status usbd_fill_iface_data(struct usbd_device *, int, int); usbd_status usb_insert_transfer(struct usbd_xfer *); void usb_transfer_complete(struct usbd_xfer *); int usbd_detach(struct usbd_device *, struct device *); +void usbd_devinfo_vp(struct usbd_device *, char *, size_t, + char *, size_t, int); /* Routines from usb.c */ void usb_needs_explore(struct usbd_device *, int); diff --git a/sys/dev/usb/uvideo.c b/sys/dev/usb/uvideo.c index 007a6e92d38..3711ee24949 100644 --- a/sys/dev/usb/uvideo.c +++ b/sys/dev/usb/uvideo.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvideo.c,v 1.196 2017/12/30 23:08:29 guenther Exp $ */ +/* $OpenBSD: uvideo.c,v 1.197 2018/04/24 17:22:33 landry Exp $ */ /* * Copyright (c) 2008 Robert Nagy <robert@openbsd.org> @@ -2781,11 +2781,14 @@ int uvideo_querycap(void *v, struct v4l2_capability *caps) { struct uvideo_softc *sc = v; + char vendor[USB_MAX_STRING_LEN]; + char product[USB_MAX_STRING_LEN]; bzero(caps, sizeof(*caps)); strlcpy(caps->driver, DEVNAME(sc), sizeof(caps->driver)); - strlcpy(caps->card, "Generic USB video class device", - sizeof(caps->card)); + usbd_devinfo_vp(sc->sc_udev, vendor, sizeof (vendor), product, + sizeof (product), 0); + strlcpy(caps->card, product, sizeof(caps->card)); strlcpy(caps->bus_info, "usb", sizeof(caps->bus_info)); caps->version = 1; |