Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/nick-nhusb]: src/sys/dev/usb Prefix ucom_attach_args struct members with...
details: https://anonhg.NetBSD.org/src/rev/a713c189a0c4
branches: nick-nhusb
changeset: 334493:a713c189a0c4
user: skrll <skrll%NetBSD.org@localhost>
date: Sat Apr 16 13:22:00 2016 +0000
description:
Prefix ucom_attach_args struct members with ucaa_ and rename variables
for consistency.
No functional change.
diffstat:
sys/dev/usb/moscom.c | 36 ++++++++++++------------
sys/dev/usb/u3g.c | 44 +++++++++++++++---------------
sys/dev/usb/uark.c | 42 ++++++++++++++--------------
sys/dev/usb/ubsa.c | 40 +++++++++++++-------------
sys/dev/usb/uchcom.c | 32 ++++++++++----------
sys/dev/usb/ucom.c | 47 ++++++++++++++++---------------
sys/dev/usb/ucomvar.h | 26 ++++++++--------
sys/dev/usb/uftdi.c | 66 ++++++++++++++++++++++----------------------
sys/dev/usb/ugensa.c | 45 +++++++++++++++---------------
sys/dev/usb/uhmodem.c | 43 +++++++++++++++--------------
sys/dev/usb/uipaq.c | 38 ++++++++++++------------
sys/dev/usb/ukyopon.c | 14 ++++----
sys/dev/usb/umcs.c | 36 ++++++++++++------------
sys/dev/usb/umct.c | 44 +++++++++++++++---------------
sys/dev/usb/umodem.c | 14 ++++----
sys/dev/usb/umodem_common.c | 34 +++++++++++-----------
sys/dev/usb/uplcom.c | 42 ++++++++++++++--------------
sys/dev/usb/usbdi.c | 7 ++--
sys/dev/usb/uslsa.c | 38 ++++++++++++------------
sys/dev/usb/uvisor.c | 56 +++++++++++++++++++-------------------
sys/dev/usb/uvscom.c | 44 +++++++++++++++---------------
21 files changed, 396 insertions(+), 392 deletions(-)
diffs (truncated from 1811 to 300 lines):
diff -r 6306d195411a -r a713c189a0c4 sys/dev/usb/moscom.c
--- a/sys/dev/usb/moscom.c Mon Apr 11 08:02:25 2016 +0000
+++ b/sys/dev/usb/moscom.c Sat Apr 16 13:22:00 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: moscom.c,v 1.8.14.6 2015/03/21 11:33:37 skrll Exp $ */
+/* $NetBSD: moscom.c,v 1.8.14.7 2016/04/16 13:22:00 skrll Exp $ */
/* $OpenBSD: moscom.c,v 1.11 2007/10/11 18:33:14 deraadt Exp $ */
/*
@@ -18,7 +18,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: moscom.c,v 1.8.14.6 2015/03/21 11:33:37 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: moscom.c,v 1.8.14.7 2016/04/16 13:22:00 skrll Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -197,7 +197,7 @@
struct moscom_softc *sc = device_private(self);
struct usb_attach_arg *uaa = aux;
struct usbd_device *dev = uaa->uaa_device;
- struct ucom_attach_args uca;
+ struct ucom_attach_args ucaa;
usb_interface_descriptor_t *id;
usb_endpoint_descriptor_t *ed;
char *devinfop;
@@ -213,7 +213,7 @@
sc->sc_dev = self;
- memset(&uca, 0, sizeof(uca));
+ memset(&ucaa, 0, sizeof(ucaa));
sc->sc_udev = uaa->uaa_device;
if (usbd_set_config_index(sc->sc_udev, MOSCOM_CONFIG_NO, 1) != 0) {
@@ -233,7 +233,7 @@
id = usbd_get_interface_descriptor(sc->sc_iface);
- uca.bulkin = uca.bulkout = -1;
+ ucaa.ucaa_bulkin = ucaa.ucaa_bulkout = -1;
for (i = 0; i < id->bNumEndpoints; i++) {
ed = usbd_interface2endpoint_descriptor(sc->sc_iface, i);
if (ed == NULL) {
@@ -245,32 +245,32 @@
if (UE_GET_DIR(ed->bEndpointAddress) == UE_DIR_IN &&
UE_GET_XFERTYPE(ed->bmAttributes) == UE_BULK)
- uca.bulkin = ed->bEndpointAddress;
+ ucaa.ucaa_bulkin = ed->bEndpointAddress;
else if (UE_GET_DIR(ed->bEndpointAddress) == UE_DIR_OUT &&
UE_GET_XFERTYPE(ed->bmAttributes) == UE_BULK)
- uca.bulkout = ed->bEndpointAddress;
+ ucaa.ucaa_bulkout = ed->bEndpointAddress;
}
- if (uca.bulkin == -1 || uca.bulkout == -1) {
+ if (ucaa.ucaa_bulkin == -1 || ucaa.ucaa_bulkout == -1) {
aprint_error_dev(self, "missing endpoint\n");
sc->sc_dying = 1;
return;
}
- uca.ibufsize = MOSCOMBUFSZ;
- uca.obufsize = MOSCOMBUFSZ;
- uca.ibufsizepad = MOSCOMBUFSZ;
- uca.opkthdrlen = 0;
- uca.device = sc->sc_udev;
- uca.iface = sc->sc_iface;
- uca.methods = &moscom_methods;
- uca.arg = sc;
- uca.info = NULL;
+ ucaa.ucaa_ibufsize = MOSCOMBUFSZ;
+ ucaa.ucaa_obufsize = MOSCOMBUFSZ;
+ ucaa.ucaa_ibufsizepad = MOSCOMBUFSZ;
+ ucaa.ucaa_opkthdrlen = 0;
+ ucaa.ucaa_device = sc->sc_udev;
+ ucaa.ucaa_iface = sc->sc_iface;
+ ucaa.ucaa_methods = &moscom_methods;
+ ucaa.ucaa_arg = sc;
+ ucaa.ucaa_info = NULL;
usbd_add_drv_event(USB_EVENT_DRIVER_ATTACH, sc->sc_udev,
sc->sc_dev);
- sc->sc_subdev = config_found_sm_loc(self, "ucombus", NULL, &uca,
+ sc->sc_subdev = config_found_sm_loc(self, "ucombus", NULL, &ucaa,
ucomprint, ucomsubmatch);
return;
diff -r 6306d195411a -r a713c189a0c4 sys/dev/usb/u3g.c
--- a/sys/dev/usb/u3g.c Mon Apr 11 08:02:25 2016 +0000
+++ b/sys/dev/usb/u3g.c Sat Apr 16 13:22:00 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: u3g.c,v 1.31.2.10 2015/10/06 21:32:15 skrll Exp $ */
+/* $NetBSD: u3g.c,v 1.31.2.11 2016/04/16 13:22:00 skrll Exp $ */
/*-
* Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -50,7 +50,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: u3g.c,v 1.31.2.10 2015/10/06 21:32:15 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: u3g.c,v 1.31.2.11 2016/04/16 13:22:00 skrll Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -728,7 +728,7 @@
struct usbd_interface *iface;
usb_interface_descriptor_t *id;
usb_endpoint_descriptor_t *ed;
- struct ucom_attach_args uca;
+ struct ucom_attach_args ucaa;
usbd_status error;
int n, intr_address, intr_size;
@@ -748,17 +748,17 @@
id = usbd_get_interface_descriptor(iface);
- uca.info = "3G Modem";
- uca.ibufsize = U3G_BUFF_SIZE;
- uca.obufsize = U3G_BUFF_SIZE;
- uca.ibufsizepad = U3G_BUFF_SIZE;
- uca.opkthdrlen = 0;
- uca.device = dev;
- uca.iface = iface;
- uca.methods = &u3g_methods;
- uca.arg = sc;
- uca.portno = -1;
- uca.bulkin = uca.bulkout = -1;
+ ucaa.ucaa_info = "3G Modem";
+ ucaa.ucaa_ibufsize = U3G_BUFF_SIZE;
+ ucaa.ucaa_obufsize = U3G_BUFF_SIZE;
+ ucaa.ucaa_ibufsizepad = U3G_BUFF_SIZE;
+ ucaa.ucaa_opkthdrlen = 0;
+ ucaa.ucaa_device = dev;
+ ucaa.ucaa_iface = iface;
+ ucaa.ucaa_methods = &u3g_methods;
+ ucaa.ucaa_arg = sc;
+ ucaa.ucaa_portno = -1;
+ ucaa.ucaa_bulkin = ucaa.ucaa_bulkout = -1;
sc->sc_ifaceno = uiaa->uiaa_ifaceno;
@@ -781,29 +781,29 @@
} else
if (UE_GET_DIR(ed->bEndpointAddress) == UE_DIR_IN &&
UE_GET_XFERTYPE(ed->bmAttributes) == UE_BULK) {
- uca.bulkin = ed->bEndpointAddress;
+ ucaa.ucaa_bulkin = ed->bEndpointAddress;
} else
if (UE_GET_DIR(ed->bEndpointAddress) == UE_DIR_OUT &&
UE_GET_XFERTYPE(ed->bmAttributes) == UE_BULK) {
- uca.bulkout = ed->bEndpointAddress;
+ ucaa.ucaa_bulkout = ed->bEndpointAddress;
}
- if (uca.bulkin != -1 && uca.bulkout != -1) {
+ if (ucaa.ucaa_bulkin != -1 && ucaa.ucaa_bulkout != -1) {
struct u3g_com *com;
if (sc->sc_ncom == __arraycount(sc->sc_com)) {
aprint_error_dev(self, "Need to configure "
"more than %zu ttys", sc->sc_ncom);
continue;
}
- uca.portno = sc->sc_ncom++;
- com = &sc->sc_com[uca.portno];
+ ucaa.ucaa_portno = sc->sc_ncom++;
+ com = &sc->sc_com[ucaa.ucaa_portno];
com->c_outpins = 0;
com->c_msr = UMSR_DSR | UMSR_CTS | UMSR_DCD;
com->c_open = false;
com->c_purging = false;
com->c_dev = config_found_sm_loc(self, "ucombus",
- NULL, &uca, ucomprint, ucomsubmatch);
- uca.bulkin = -1;
- uca.bulkout = -1;
+ NULL, &ucaa, ucomprint, ucomsubmatch);
+ ucaa.ucaa_bulkin = -1;
+ ucaa.ucaa_bulkout = -1;
}
}
diff -r 6306d195411a -r a713c189a0c4 sys/dev/usb/uark.c
--- a/sys/dev/usb/uark.c Mon Apr 11 08:02:25 2016 +0000
+++ b/sys/dev/usb/uark.c Sat Apr 16 13:22:00 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uark.c,v 1.6.14.4 2015/09/28 16:24:19 skrll Exp $ */
+/* $NetBSD: uark.c,v 1.6.14.5 2016/04/16 13:22:00 skrll Exp $ */
/* $OpenBSD: uark.c,v 1.13 2009/10/13 19:33:17 pirofti Exp $ */
/*
@@ -99,7 +99,7 @@
extern struct cfdriver uark_cd;
CFATTACH_DECL_NEW(uark, sizeof(struct uark_softc), uark_match, uark_attach, uark_detach, uark_activate);
-int
+int
uark_match(device_t parent, cfdata_t match, void *aux)
{
struct usb_attach_arg *uaa = aux;
@@ -108,20 +108,20 @@
UMATCH_VENDOR_PRODUCT : UMATCH_NONE;
}
-void
+void
uark_attach(device_t parent, device_t self, void *aux)
{
struct uark_softc *sc = device_private(self);
struct usb_attach_arg *uaa = aux;
struct usbd_device *dev = uaa->uaa_device;
char *devinfop;
- struct ucom_attach_args uca;
+ struct ucom_attach_args ucaa;
usb_interface_descriptor_t *id;
usb_endpoint_descriptor_t *ed;
usbd_status error;
int i;
- memset(&uca, 0, sizeof(uca));
+ memset(&ucaa, 0, sizeof(ucaa));
sc->sc_dev = self;
devinfop = usbd_devinfo_alloc(dev, 0);
@@ -149,7 +149,7 @@
id = usbd_get_interface_descriptor(sc->sc_iface);
- uca.bulkin = uca.bulkout = -1;
+ ucaa.ucaa_bulkin = ucaa.ucaa_bulkout = -1;
for (i = 0; i < id->bNumEndpoints; i++) {
ed = usbd_interface2endpoint_descriptor(sc->sc_iface, i);
if (ed == NULL) {
@@ -161,32 +161,32 @@
if (UE_GET_DIR(ed->bEndpointAddress) == UE_DIR_IN &&
UE_GET_XFERTYPE(ed->bmAttributes) == UE_BULK)
- uca.bulkin = ed->bEndpointAddress;
+ ucaa.ucaa_bulkin = ed->bEndpointAddress;
else if (UE_GET_DIR(ed->bEndpointAddress) == UE_DIR_OUT &&
UE_GET_XFERTYPE(ed->bmAttributes) == UE_BULK)
- uca.bulkout = ed->bEndpointAddress;
+ ucaa.ucaa_bulkout = ed->bEndpointAddress;
}
- if (uca.bulkin == -1 || uca.bulkout == -1) {
+ if (ucaa.ucaa_bulkin == -1 || ucaa.ucaa_bulkout == -1) {
aprint_error_dev(self, "missing endpoint\n");
sc->sc_dying = 1;
return;
}
- uca.ibufsize = UARKBUFSZ;
- uca.obufsize = UARKBUFSZ;
- uca.ibufsizepad = UARKBUFSZ;
- uca.opkthdrlen = 0;
- uca.device = sc->sc_udev;
- uca.iface = sc->sc_iface;
- uca.methods = &uark_methods;
- uca.arg = sc;
- uca.info = NULL;
+ ucaa.ucaa_ibufsize = UARKBUFSZ;
+ ucaa.ucaa_obufsize = UARKBUFSZ;
+ ucaa.ucaa_ibufsizepad = UARKBUFSZ;
+ ucaa.ucaa_opkthdrlen = 0;
+ ucaa.ucaa_device = sc->sc_udev;
+ ucaa.ucaa_iface = sc->sc_iface;
+ ucaa.ucaa_methods = &uark_methods;
+ ucaa.ucaa_arg = sc;
+ ucaa.ucaa_info = NULL;
usbd_add_drv_event(USB_EVENT_DRIVER_ATTACH, sc->sc_udev,
sc->sc_dev);
-
- sc->sc_subdev = config_found_sm_loc(self, "ucombus", NULL, &uca,
+
+ sc->sc_subdev = config_found_sm_loc(self, "ucombus", NULL, &ucaa,
ucomprint, ucomsubmatch);
return;
@@ -318,7 +318,7 @@
uark_get_status(void *vsc, int portno, u_char *lsr, u_char *msr)
{
struct uark_softc *sc = vsc;
-
+
if (msr != NULL)
*msr = sc->sc_msr;
if (lsr != NULL)
diff -r 6306d195411a -r a713c189a0c4 sys/dev/usb/ubsa.c
--- a/sys/dev/usb/ubsa.c Mon Apr 11 08:02:25 2016 +0000
+++ b/sys/dev/usb/ubsa.c Sat Apr 16 13:22:00 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ubsa.c,v 1.30.16.6 2015/12/28 08:28:11 skrll Exp $ */
+/* $NetBSD: ubsa.c,v 1.30.16.7 2016/04/16 13:22:00 skrll Exp $ */
/*-
* Copyright (c) 2002, Alexander Kabaev <kan.FreeBSD.org>.
Home |
Main Index |
Thread Index |
Old Index