summaryrefslogtreecommitdiff
path: root/sys/dev/usb/uplcom.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/usb/uplcom.c')
-rw-r--r--sys/dev/usb/uplcom.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/sys/dev/usb/uplcom.c b/sys/dev/usb/uplcom.c
index a382c789e4e..bc0d70fdcf9 100644
--- a/sys/dev/usb/uplcom.c
+++ b/sys/dev/usb/uplcom.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uplcom.c,v 1.38 2007/06/10 10:53:48 mbalmer Exp $ */
+/* $OpenBSD: uplcom.c,v 1.39 2007/06/10 14:49:01 mbalmer Exp $ */
/* $NetBSD: uplcom.c,v 1.29 2002/09/23 05:51:23 simonb Exp $ */
/*
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -215,7 +215,7 @@ uplcom_attach(struct device *parent, struct device *self, void *aux)
usb_endpoint_descriptor_t *ed;
char *devinfop;
- char *devname = USBDEVNAME(sc->sc_dev);
+ char *devname = sc->sc_dev.dv_xname;
usbd_status err;
int i;
struct ucom_attach_args uca;
@@ -247,7 +247,7 @@ uplcom_attach(struct device *parent, struct device *self, void *aux)
if (cdesc == NULL) {
printf("%s: failed to get configuration descriptor\n",
- USBDEVNAME(sc->sc_dev));
+ sc->sc_dev.dv_xname);
sc->sc_dying = 1;
return;
}
@@ -256,7 +256,7 @@ uplcom_attach(struct device *parent, struct device *self, void *aux)
ddesc = usbd_get_device_descriptor(sc->sc_udev);
if (ddesc == NULL) {
printf("%s: failed to get device descriptor\n",
- USBDEVNAME(sc->sc_dev));
+ sc->sc_dev.dv_xname);
sc->sc_dying = 1;
return;
}
@@ -266,7 +266,7 @@ uplcom_attach(struct device *parent, struct device *self, void *aux)
* variants. The datasheets disagree.
*/
if (ddesc->bMaxPacketSize == 0x40) {
- DPRINTF(("%s: Assuming HX variant\n", USBDEVNAME(sc->sc_dev)));
+ DPRINTF(("%s: Assuming HX variant\n", sc->sc_dev.dv_xname));
sc->sc_type_hx = 1;
} else
sc->sc_type_hx = 0;
@@ -290,7 +290,7 @@ uplcom_attach(struct device *parent, struct device *self, void *aux)
ed = usbd_interface2endpoint_descriptor(sc->sc_iface, i);
if (ed == NULL) {
printf("%s: no endpoint descriptor for %d\n",
- USBDEVNAME(sc->sc_dev), i);
+ sc->sc_dev.dv_xname, i);
sc->sc_dying = 1;
return;
}
@@ -304,7 +304,7 @@ uplcom_attach(struct device *parent, struct device *self, void *aux)
if (sc->sc_intr_number== -1) {
printf("%s: Could not find interrupt in\n",
- USBDEVNAME(sc->sc_dev));
+ sc->sc_dev.dv_xname);
sc->sc_dying = 1;
return;
}
@@ -344,7 +344,7 @@ uplcom_attach(struct device *parent, struct device *self, void *aux)
ed = usbd_interface2endpoint_descriptor(sc->sc_iface, i);
if (ed == NULL) {
printf("%s: no endpoint descriptor for %d\n",
- USBDEVNAME(sc->sc_dev), i);
+ sc->sc_dev.dv_xname, i);
sc->sc_dying = 1;
return;
}
@@ -360,14 +360,14 @@ uplcom_attach(struct device *parent, struct device *self, void *aux)
if (uca.bulkin == -1) {
printf("%s: Could not find data bulk in\n",
- USBDEVNAME(sc->sc_dev));
+ sc->sc_dev.dv_xname);
sc->sc_dying = 1;
return;
}
if (uca.bulkout == -1) {
printf("%s: Could not find data bulk out\n",
- USBDEVNAME(sc->sc_dev));
+ sc->sc_dev.dv_xname);
sc->sc_dying = 1;
return;
}
@@ -388,7 +388,7 @@ uplcom_attach(struct device *parent, struct device *self, void *aux)
err = uplcom_reset(sc);
if (err) {
- printf("%s: reset failed, %s\n", USBDEVNAME(sc->sc_dev),
+ printf("%s: reset failed, %s\n", sc->sc_dev.dv_xname,
usbd_errstr(err));
sc->sc_dying = 1;
return;
@@ -690,7 +690,7 @@ uplcom_open(void *addr, int portno)
uplcom_intr, USBD_DEFAULT_INTERVAL);
if (err) {
DPRINTF(("%s: cannot open interrupt pipe (addr %d)\n",
- USBDEVNAME(sc->sc_dev), sc->sc_intr_number));
+ sc->sc_dev.dv_xname, sc->sc_intr_number));
return (EIO);
}
}
@@ -750,11 +750,11 @@ uplcom_close(void *addr, int portno)
err = usbd_abort_pipe(sc->sc_intr_pipe);
if (err)
printf("%s: abort interrupt pipe failed: %s\n",
- USBDEVNAME(sc->sc_dev), usbd_errstr(err));
+ sc->sc_dev.dv_xname, usbd_errstr(err));
err = usbd_close_pipe(sc->sc_intr_pipe);
if (err)
printf("%s: close interrupt pipe failed: %s\n",
- USBDEVNAME(sc->sc_dev), usbd_errstr(err));
+ sc->sc_dev.dv_xname, usbd_errstr(err));
free(sc->sc_intr_buf, M_USBDEV);
sc->sc_intr_pipe = NULL;
}
@@ -774,13 +774,13 @@ uplcom_intr(usbd_xfer_handle xfer, usbd_private_handle priv, usbd_status status)
if (status == USBD_NOT_STARTED || status == USBD_CANCELLED)
return;
- DPRINTF(("%s: abnormal status: %s\n", USBDEVNAME(sc->sc_dev),
+ DPRINTF(("%s: abnormal status: %s\n", sc->sc_dev.dv_xname,
usbd_errstr(status)));
usbd_clear_endpoint_stall_async(sc->sc_intr_pipe);
return;
}
- DPRINTF(("%s: uplcom status = %02x\n", USBDEVNAME(sc->sc_dev), buf[8]));
+ DPRINTF(("%s: uplcom status = %02x\n", sc->sc_dev.dv_xname, buf[8]));
sc->sc_lsr = sc->sc_msr = 0;
pstatus = buf[8];