diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2016-09-02 09:15:00 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2016-09-02 09:15:00 +0000 |
commit | fe7af4c9c3612ca0b09115f8d0312efa4fe61191 (patch) | |
tree | 10c82c7f71bb0b26e7594ccaad05b2f1a114d0b0 /sys/dev/usb/uts.c | |
parent | f6a9246aed352fd652bf23b51d226a965b2188ec (diff) |
Avoid calling usbd_set_config_index() in *_attach() and let the stack
do it instead.
If anything bad happen due to a malformed descriptor it makes no sense
to try to attach a driver, and bail before probing.
Diffstat (limited to 'sys/dev/usb/uts.c')
-rw-r--r-- | sys/dev/usb/uts.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/sys/dev/usb/uts.c b/sys/dev/usb/uts.c index f3dfd36d278..c60fd417606 100644 --- a/sys/dev/usb/uts.c +++ b/sys/dev/usb/uts.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uts.c,v 1.38 2016/06/05 20:15:54 bru Exp $ */ +/* $OpenBSD: uts.c,v 1.39 2016/09/02 09:14:59 mpi Exp $ */ /* * Copyright (c) 2007 Robert Nagy <robert@openbsd.org> @@ -44,8 +44,6 @@ #define DPRINTF(x) #endif -#define UTS_CONFIG_INDEX 0 - struct tsscale { int minx, maxx; int miny, maxy; @@ -163,14 +161,6 @@ uts_attach(struct device *parent, struct device *self, void *aux) /* Copy the default scalue values to each softc */ bcopy(&def_scale, &sc->sc_tsscale, sizeof(sc->sc_tsscale)); - /* Move the device into the configured state. */ - if (usbd_set_config_index(uaa->device, UTS_CONFIG_INDEX, 1) != 0) { - printf("%s: could not set configuartion no\n", - sc->sc_dev.dv_xname); - usbd_deactivate(sc->sc_udev); - return; - } - /* get the config descriptor */ cdesc = usbd_get_config_descriptor(sc->sc_udev); if (cdesc == NULL) { |