diff options
author | Marcus Glocker <mglocker@cvs.openbsd.org> | 2013-04-26 13:46:41 +0000 |
---|---|---|
committer | Marcus Glocker <mglocker@cvs.openbsd.org> | 2013-04-26 13:46:41 +0000 |
commit | c510b7bcbffb292d898d642ed97ccd4e6aacb410 (patch) | |
tree | e12410d1a560c896f21caeb02d051c3b19063b2a | |
parent | 0c7a971f6853884ad5963b5a2d990a987fd6616d (diff) |
Rename three functions in usbdi.c to their right prefix (usb_* to usbd_*).
ok mpi@
-rw-r--r-- | sys/dev/usb/if_cdce.c | 10 | ||||
-rw-r--r-- | sys/dev/usb/udfu.c | 6 | ||||
-rw-r--r-- | sys/dev/usb/umodem.c | 8 | ||||
-rw-r--r-- | sys/dev/usb/usbdi.c | 14 | ||||
-rw-r--r-- | sys/dev/usb/usbdi.h | 10 | ||||
-rw-r--r-- | sys/dev/usb/uvideo.c | 54 |
6 files changed, 51 insertions, 51 deletions
diff --git a/sys/dev/usb/if_cdce.c b/sys/dev/usb/if_cdce.c index d3def9a2c7b..b4b1cdd040f 100644 --- a/sys/dev/usb/if_cdce.c +++ b/sys/dev/usb/if_cdce.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_cdce.c,v 1.53 2013/04/15 09:23:01 mglocker Exp $ */ +/* $OpenBSD: if_cdce.c,v 1.54 2013/04/26 13:46:40 mglocker Exp $ */ /* * Copyright (c) 1997, 1998, 1999, 2000-2003 Bill Paul <wpaul@windriver.com> @@ -189,11 +189,11 @@ cdce_attach(struct device *parent, struct device *self, void *aux) /* Get the data interface no. and capabilities */ ethd = NULL; - usb_desc_iter_init(dev, &iter); - desc = usb_desc_iter_next(&iter); + usbd_desc_iter_init(dev, &iter); + desc = usbd_desc_iter_next(&iter); while (desc) { if (desc->bDescriptorType != UDESC_CS_INTERFACE) { - desc = usb_desc_iter_next(&iter); + desc = usbd_desc_iter_next(&iter); continue; } switch(desc->bDescriptorSubtype) { @@ -215,7 +215,7 @@ cdce_attach(struct device *parent, struct device *self, void *aux) ethd = (struct usb_cdc_ethernet_descriptor *)desc; break; } - desc = usb_desc_iter_next(&iter); + desc = usbd_desc_iter_next(&iter); } if (data_ifcno == -1) { diff --git a/sys/dev/usb/udfu.c b/sys/dev/usb/udfu.c index 7097f61f109..10c4da4c903 100644 --- a/sys/dev/usb/udfu.c +++ b/sys/dev/usb/udfu.c @@ -1,4 +1,4 @@ -/* $OpenBSD: udfu.c,v 1.5 2013/04/15 09:23:02 mglocker Exp $ */ +/* $OpenBSD: udfu.c,v 1.6 2013/04/26 13:46:40 mglocker Exp $ */ /* * Copyright (c) 2009 Federico G. Schwindt <fgsch@openbsd.org> @@ -185,8 +185,8 @@ udfu_parse_desc(struct udfu_softc *sc) const usb_descriptor_t *desc; struct usbd_desc_iter iter; - usb_desc_iter_init(sc->sc_udev, &iter); - while ((desc = usb_desc_iter_next(&iter))) { + usbd_desc_iter_init(sc->sc_udev, &iter); + while ((desc = usbd_desc_iter_next(&iter))) { if (desc->bDescriptorType == UDESC_CS_DEVICE) break; } diff --git a/sys/dev/usb/umodem.c b/sys/dev/usb/umodem.c index 26b8c369424..bd0127f130a 100644 --- a/sys/dev/usb/umodem.c +++ b/sys/dev/usb/umodem.c @@ -1,4 +1,4 @@ -/* $OpenBSD: umodem.c,v 1.48 2013/04/15 09:23:02 mglocker Exp $ */ +/* $OpenBSD: umodem.c,v 1.49 2013/04/26 13:46:40 mglocker Exp $ */ /* $NetBSD: umodem.c,v 1.45 2002/09/23 05:51:23 simonb Exp $ */ /* @@ -173,8 +173,8 @@ umodem_get_caps(struct usb_attach_arg *uaa, int ctl_iface_no, *data_iface_no = -1; *cm_cap = *acm_cap = 0; - usb_desc_iter_init(uaa->device, &iter); - desc = usb_desc_iter_next(&iter); + usbd_desc_iter_init(uaa->device, &iter); + desc = usbd_desc_iter_next(&iter); while (desc) { if (desc->bDescriptorType == UDESC_INTERFACE) { id = (usb_interface_descriptor_t *)desc; @@ -204,7 +204,7 @@ umodem_get_caps(struct usb_attach_arg *uaa, int ctl_iface_no, break; } } - desc = usb_desc_iter_next(&iter); + desc = usbd_desc_iter_next(&iter); } } diff --git a/sys/dev/usb/usbdi.c b/sys/dev/usb/usbdi.c index df4e647311a..406300c21a5 100644 --- a/sys/dev/usb/usbdi.c +++ b/sys/dev/usb/usbdi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: usbdi.c,v 1.52 2013/04/19 08:58:53 mpi Exp $ */ +/* $OpenBSD: usbdi.c,v 1.53 2013/04/26 13:46:40 mglocker Exp $ */ /* $NetBSD: usbdi.c,v 1.103 2002/09/27 15:37:38 provos Exp $ */ /* $FreeBSD: src/sys/dev/usb/usbdi.c,v 1.28 1999/11/17 22:33:49 n_hibma Exp $ */ @@ -1108,7 +1108,7 @@ usbd_ratecheck(struct timeval *last) * given as an argument. */ const struct usb_devno * -usb_match_device(const struct usb_devno *tbl, u_int nentries, u_int sz, +usbd_match_device(const struct usb_devno *tbl, u_int nentries, u_int sz, u_int16_t vendor, u_int16_t product) { while (nentries-- > 0) { @@ -1122,7 +1122,7 @@ usb_match_device(const struct usb_devno *tbl, u_int nentries, u_int sz, } void -usb_desc_iter_init(struct usbd_device *dev, struct usbd_desc_iter *iter) +usbd_desc_iter_init(struct usbd_device *dev, struct usbd_desc_iter *iter) { const usb_config_descriptor_t *cd = usbd_get_config_descriptor(dev); @@ -1131,23 +1131,23 @@ usb_desc_iter_init(struct usbd_device *dev, struct usbd_desc_iter *iter) } const usb_descriptor_t * -usb_desc_iter_next(struct usbd_desc_iter *iter) +usbd_desc_iter_next(struct usbd_desc_iter *iter) { const usb_descriptor_t *desc; if (iter->cur + sizeof(usb_descriptor_t) >= iter->end) { if (iter->cur != iter->end) - printf("usb_desc_iter_next: bad descriptor\n"); + printf("usbd_desc_iter_next: bad descriptor\n"); return NULL; } desc = (const usb_descriptor_t *)iter->cur; if (desc->bLength == 0) { - printf("usb_desc_iter_next: descriptor length = 0\n"); + printf("usbd_desc_iter_next: descriptor length = 0\n"); return NULL; } iter->cur += desc->bLength; if (iter->cur > iter->end) { - printf("usb_desc_iter_next: descriptor length too large\n"); + printf("usbd_desc_iter_next: descriptor length too large\n"); return NULL; } return desc; diff --git a/sys/dev/usb/usbdi.h b/sys/dev/usb/usbdi.h index 4dba8d1d05e..cb91b822c2f 100644 --- a/sys/dev/usb/usbdi.h +++ b/sys/dev/usb/usbdi.h @@ -1,4 +1,4 @@ -/* $OpenBSD: usbdi.h,v 1.50 2013/04/19 08:54:50 mpi Exp $ */ +/* $OpenBSD: usbdi.h,v 1.51 2013/04/26 13:46:40 mglocker Exp $ */ /* $NetBSD: usbdi.h,v 1.62 2002/07/11 21:14:35 augustss Exp $ */ /* $FreeBSD: src/sys/dev/usb/usbdi.h,v 1.18 1999/11/17 22:33:49 n_hibma Exp $ */ @@ -169,8 +169,8 @@ struct usbd_desc_iter { const uByte *cur; const uByte *end; }; -void usb_desc_iter_init(struct usbd_device *, struct usbd_desc_iter *); -const usb_descriptor_t *usb_desc_iter_next(struct usbd_desc_iter *); +void usbd_desc_iter_init(struct usbd_device *, struct usbd_desc_iter *); +const usb_descriptor_t *usbd_desc_iter_next(struct usbd_desc_iter *); /* * The usb_task structs form a queue of things to run in the USB task @@ -208,10 +208,10 @@ struct usb_devno { u_int16_t ud_vendor; u_int16_t ud_product; }; -const struct usb_devno *usb_match_device(const struct usb_devno *tbl, +const struct usb_devno *usbd_match_device(const struct usb_devno *tbl, u_int nentries, u_int sz, u_int16_t vendor, u_int16_t product); #define usb_lookup(tbl, vendor, product) \ - usb_match_device((const struct usb_devno *)(tbl), sizeof (tbl) / sizeof ((tbl)[0]), sizeof ((tbl)[0]), (vendor), (product)) + usbd_match_device((const struct usb_devno *)(tbl), sizeof (tbl) / sizeof ((tbl)[0]), sizeof ((tbl)[0]), (vendor), (product)) #define USB_PRODUCT_ANY 0xffff /* NetBSD attachment information */ diff --git a/sys/dev/usb/uvideo.c b/sys/dev/usb/uvideo.c index d0a08b3d0c5..3d1a75354bc 100644 --- a/sys/dev/usb/uvideo.c +++ b/sys/dev/usb/uvideo.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvideo.c,v 1.170 2013/04/15 09:23:02 mglocker Exp $ */ +/* $OpenBSD: uvideo.c,v 1.171 2013/04/26 13:46:40 mglocker Exp $ */ /* * Copyright (c) 2008 Robert Nagy <robert@openbsd.org> @@ -587,11 +587,11 @@ uvideo_vc_parse_desc(struct uvideo_softc *sc) vc_header_found = 0; - usb_desc_iter_init(sc->sc_udev, &iter); - desc = usb_desc_iter_next(&iter); + usbd_desc_iter_init(sc->sc_udev, &iter); + desc = usbd_desc_iter_next(&iter); while (desc) { if (desc->bDescriptorType != UDESC_CS_INTERFACE) { - desc = usb_desc_iter_next(&iter); + desc = usbd_desc_iter_next(&iter); continue; } @@ -620,7 +620,7 @@ uvideo_vc_parse_desc(struct uvideo_softc *sc) /* TODO: which VC descriptors do we need else? */ } - desc = usb_desc_iter_next(&iter); + desc = usbd_desc_iter_next(&iter); } if (vc_header_found == 0) { @@ -783,11 +783,11 @@ uvideo_vs_parse_desc(struct uvideo_softc *sc, usb_config_descriptor_t *cdesc) DPRINTF(1, "%s: number of VS interfaces=%d\n", DEVNAME(sc), sc->sc_desc_vc_header.fix->bInCollection); - usb_desc_iter_init(sc->sc_udev, &iter); - desc = usb_desc_iter_next(&iter); + usbd_desc_iter_init(sc->sc_udev, &iter); + desc = usbd_desc_iter_next(&iter); while (desc) { if (desc->bDescriptorType != UDESC_CS_INTERFACE) { - desc = usb_desc_iter_next(&iter); + desc = usbd_desc_iter_next(&iter); continue; } @@ -803,7 +803,7 @@ uvideo_vs_parse_desc(struct uvideo_softc *sc, usb_config_descriptor_t *cdesc) /* TODO: which VS descriptors do we need else? */ } - desc = usb_desc_iter_next(&iter); + desc = usbd_desc_iter_next(&iter); } /* parse video stream format descriptors */ @@ -873,11 +873,11 @@ uvideo_vs_parse_desc_format(struct uvideo_softc *sc) DPRINTF(1, "%s: %s\n", DEVNAME(sc), __func__); - usb_desc_iter_init(sc->sc_udev, &iter); - desc = usb_desc_iter_next(&iter); + usbd_desc_iter_init(sc->sc_udev, &iter); + desc = usbd_desc_iter_next(&iter); while (desc) { if (desc->bDescriptorType != UDESC_CS_INTERFACE) { - desc = usb_desc_iter_next(&iter); + desc = usbd_desc_iter_next(&iter); continue; } @@ -896,7 +896,7 @@ uvideo_vs_parse_desc_format(struct uvideo_softc *sc) break; } - desc = usb_desc_iter_next(&iter); + desc = usbd_desc_iter_next(&iter); } sc->sc_fmtgrp_idx = 0; @@ -1012,8 +1012,8 @@ uvideo_vs_parse_desc_frame(struct uvideo_softc *sc) DPRINTF(1, "%s: %s\n", DEVNAME(sc), __func__); - usb_desc_iter_init(sc->sc_udev, &iter); - desc = usb_desc_iter_next(&iter); + usbd_desc_iter_init(sc->sc_udev, &iter); + desc = usbd_desc_iter_next(&iter); while (desc) { if (desc->bDescriptorType == UDESC_CS_INTERFACE && desc->bLength > sizeof(struct usb_video_frame_desc) && @@ -1023,7 +1023,7 @@ uvideo_vs_parse_desc_frame(struct uvideo_softc *sc) if (error != USBD_NORMAL_COMPLETION) return (error); } - desc = usb_desc_iter_next(&iter); + desc = usbd_desc_iter_next(&iter); } return (USBD_NORMAL_COMPLETION); @@ -1099,8 +1099,8 @@ uvideo_vs_parse_desc_alt(struct uvideo_softc *sc, int vs_nr, int iface, int numa vs = &sc->sc_vs_coll[vs_nr]; - usb_desc_iter_init(sc->sc_udev, &iter); - desc = usb_desc_iter_next(&iter); + usbd_desc_iter_init(sc->sc_udev, &iter); + desc = usbd_desc_iter_next(&iter); while (desc) { /* find video stream interface */ if (desc->bDescriptorType != UDESC_INTERFACE) @@ -1116,7 +1116,7 @@ uvideo_vs_parse_desc_alt(struct uvideo_softc *sc, int vs_nr, int iface, int numa } /* jump to corresponding endpoint descriptor */ - while ((desc = usb_desc_iter_next(&iter))) { + while ((desc = usbd_desc_iter_next(&iter))) { if (desc->bDescriptorType == UDESC_ENDPOINT) break; } @@ -1144,7 +1144,7 @@ uvideo_vs_parse_desc_alt(struct uvideo_softc *sc, int vs_nr, int iface, int numa vs->iface = iface; } next: - desc = usb_desc_iter_next(&iter); + desc = usbd_desc_iter_next(&iter); } /* check if we have found a valid alternate interface */ @@ -1170,8 +1170,8 @@ uvideo_vs_set_alt(struct uvideo_softc *sc, struct usbd_interface *ifaceh, uint32_t psize; i = 0; - usb_desc_iter_init(sc->sc_udev, &iter); - desc = usb_desc_iter_next(&iter); + usbd_desc_iter_init(sc->sc_udev, &iter); + desc = usbd_desc_iter_next(&iter); while (desc) { /* find video stream interface */ if (desc->bDescriptorType != UDESC_INTERFACE) @@ -1183,7 +1183,7 @@ uvideo_vs_set_alt(struct uvideo_softc *sc, struct usbd_interface *ifaceh, goto next; /* jump to corresponding endpoint descriptor */ - desc = usb_desc_iter_next(&iter); + desc = usbd_desc_iter_next(&iter); if (desc->bDescriptorType != UDESC_ENDPOINT) goto next; ed = (usb_endpoint_descriptor_t *)(uint8_t *)desc; @@ -1205,7 +1205,7 @@ uvideo_vs_set_alt(struct uvideo_softc *sc, struct usbd_interface *ifaceh, break; } next: - desc = usb_desc_iter_next(&iter); + desc = usbd_desc_iter_next(&iter); } DPRINTF(1, "%s: set alternate iface to ", DEVNAME(sc)); @@ -2209,8 +2209,8 @@ uvideo_dump_desc_all(struct uvideo_softc *sc) struct usbd_desc_iter iter; const usb_descriptor_t *desc; - usb_desc_iter_init(sc->sc_udev, &iter); - desc = usb_desc_iter_next(&iter); + usbd_desc_iter_init(sc->sc_udev, &iter); + desc = usbd_desc_iter_next(&iter); while (desc) { printf("bLength=%d\n", desc->bLength); printf("bDescriptorType=0x%02x", desc->bDescriptorType); @@ -2357,7 +2357,7 @@ uvideo_dump_desc_all(struct uvideo_softc *sc) printf("\n"); - desc = usb_desc_iter_next(&iter); + desc = usbd_desc_iter_next(&iter); } } |