diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2013-04-09 08:42:49 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2013-04-09 08:42:49 +0000 |
commit | 8024b3fb4bf427743b360bf2fcdef4b54113a57a (patch) | |
tree | 9d67628f77a6510dbfaf1b8c3d075d9d2f02dfb2 /sys/dev/usb | |
parent | 2fa7fe94ac6fd20c6f47e5c80dda14009167ab6c (diff) |
There's no need for usbd_get_config_desc_full() so just call usbd_get_desc()
directly this also makes it easier to understand which function actually
generates IO.
ok mglocker@
Diffstat (limited to 'sys/dev/usb')
-rw-r--r-- | sys/dev/usb/usb_subr.c | 4 | ||||
-rw-r--r-- | sys/dev/usb/usbdi_util.c | 9 | ||||
-rw-r--r-- | sys/dev/usb/usbdi_util.h | 3 |
3 files changed, 4 insertions, 12 deletions
diff --git a/sys/dev/usb/usb_subr.c b/sys/dev/usb/usb_subr.c index 976353cb574..b4eca5a270b 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.85 2013/04/01 19:49:53 mglocker Exp $ */ +/* $OpenBSD: usb_subr.c,v 1.86 2013/04/09 08:42:48 mpi 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 $ */ @@ -1424,7 +1424,7 @@ usbd_get_cdesc(usbd_device_handle dev, int index, int *lenp) if (lenp) *lenp = len; cdesc = malloc(len, M_TEMP, M_WAITOK); - err = usbd_get_config_desc_full(dev, index, cdesc, len); + err = usbd_get_desc(dev, UDESC_CONFIG, index, len, cdesc); if (err) { free(cdesc, M_TEMP); return (0); diff --git a/sys/dev/usb/usbdi_util.c b/sys/dev/usb/usbdi_util.c index 9e21fd26694..b67ab5c9ec5 100644 --- a/sys/dev/usb/usbdi_util.c +++ b/sys/dev/usb/usbdi_util.c @@ -1,4 +1,4 @@ -/* $OpenBSD: usbdi_util.c,v 1.27 2013/03/28 03:58:03 tedu Exp $ */ +/* $OpenBSD: usbdi_util.c,v 1.28 2013/04/09 08:42:48 mpi Exp $ */ /* $NetBSD: usbdi_util.c,v 1.40 2002/07/11 21:14:36 augustss Exp $ */ /* $FreeBSD: src/sys/dev/usb/usbdi_util.c,v 1.14 1999/11/17 22:33:50 n_hibma Exp $ */ @@ -90,13 +90,6 @@ usbd_get_config_desc(usbd_device_handle dev, int confidx, } usbd_status -usbd_get_config_desc_full(usbd_device_handle dev, int conf, void *d, int size) -{ - DPRINTFN(3,("usbd_get_config_desc_full: conf=%d\n", conf)); - return (usbd_get_desc(dev, UDESC_CONFIG, conf, size, d)); -} - -usbd_status usbd_get_device_desc(usbd_device_handle dev, usb_device_descriptor_t *d) { DPRINTFN(3,("usbd_get_device_desc:\n")); diff --git a/sys/dev/usb/usbdi_util.h b/sys/dev/usb/usbdi_util.h index b399acc47c7..c653c6c4342 100644 --- a/sys/dev/usb/usbdi_util.h +++ b/sys/dev/usb/usbdi_util.h @@ -1,4 +1,4 @@ -/* $OpenBSD: usbdi_util.h,v 1.17 2008/06/26 05:42:19 ray Exp $ */ +/* $OpenBSD: usbdi_util.h,v 1.18 2013/04/09 08:42:48 mpi Exp $ */ /* $NetBSD: usbdi_util.h,v 1.28 2002/07/11 21:14:36 augustss Exp $ */ /* $FreeBSD: src/sys/dev/usb/usbdi_util.h,v 1.9 1999/11/17 22:33:50 n_hibma Exp $ */ @@ -36,7 +36,6 @@ usbd_status usbd_get_desc(usbd_device_handle dev, int type, int index, int len, void *desc); usbd_status usbd_get_config_desc(usbd_device_handle, int, usb_config_descriptor_t *); -usbd_status usbd_get_config_desc_full(usbd_device_handle, int, void *, int); usbd_status usbd_get_device_desc(usbd_device_handle dev, usb_device_descriptor_t *d); usbd_status usbd_set_address(usbd_device_handle dev, int addr); |