summaryrefslogtreecommitdiff
path: root/sys/dev/usb/udcf.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2007-10-11 18:33:16 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2007-10-11 18:33:16 +0000
commitc8d027b7c2c9478cc6134a64ce7f4493c4f31d03 (patch)
treed059b171ccae4a9b91e72ce31662e4163fb1e943 /sys/dev/usb/udcf.c
parentcb538c3cbe26e67bac2b85c75da7259a005d264e (diff)
treat usb vendor/product names as a locator, and have usbd_print handle it,
so that it shows up before the :. as a result, all the usb devices do not need to have name printing code anymore. all this now works and prints nicely because usbd_probe_and_attach() is serialized. ok kettenis
Diffstat (limited to 'sys/dev/usb/udcf.c')
-rw-r--r--sys/dev/usb/udcf.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/sys/dev/usb/udcf.c b/sys/dev/usb/udcf.c
index 93cb4ddc0be..550803ab995 100644
--- a/sys/dev/usb/udcf.c
+++ b/sys/dev/usb/udcf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: udcf.c,v 1.38 2007/06/14 10:11:15 mbalmer Exp $ */
+/* $OpenBSD: udcf.c,v 1.39 2007/10/11 18:33:14 deraadt Exp $ */
/*
* Copyright (c) 2006 Marc Balmer <mbalmer@openbsd.org>
@@ -171,7 +171,6 @@ udcf_attach(struct device *parent, struct device *self, void *aux)
usbd_device_handle dev = uaa->device;
usbd_interface_handle iface;
struct timeval t;
- char *devinfop;
usb_interface_descriptor_t *id;
usbd_status err;
usb_device_request_t req;
@@ -179,21 +178,17 @@ udcf_attach(struct device *parent, struct device *self, void *aux)
int actlen;
if ((err = usbd_set_config_index(dev, 0, 1))) {
- DPRINTF(("\n%s: failed to set configuration, err=%s\n",
+ DPRINTF(("%s: failed to set configuration, err=%s\n",
sc->sc_dev.dv_xname, usbd_errstr(err)));
goto fishy;
}
if ((err = usbd_device2interface_handle(dev, 0, &iface))) {
- DPRINTF(("\n%s: failed to get interface, err=%s\n",
+ DPRINTF(("%s: failed to get interface, err=%s\n",
sc->sc_dev.dv_xname, usbd_errstr(err)));
goto fishy;
}
- devinfop = usbd_devinfo_alloc(dev, 0);
- printf("\n%s: %s\n", sc->sc_dev.dv_xname, devinfop);
- usbd_devinfo_free(devinfop);
-
id = usbd_get_interface_descriptor(iface);
sc->sc_udev = dev;