diff options
author | 2002-07-25 02:18:10 +0000 | |
---|---|---|
committer | 2002-07-25 02:18:10 +0000 | |
commit | b95536641db67bf15b3fac9b1d0826c297bf8ebf (patch) | |
tree | 93cf3bb711e2edeeb6a82969b5f4f84c38ea99ba /sys/dev/usb/usb.c | |
parent | Modify lvalue only once between sequence points. ok deraadt@ (diff) | |
download | wireguard-openbsd-b95536641db67bf15b3fac9b1d0826c297bf8ebf.tar.xz wireguard-openbsd-b95536641db67bf15b3fac9b1d0826c297bf8ebf.zip |
get rid of trailing whitespace
Diffstat (limited to 'sys/dev/usb/usb.c')
-rw-r--r-- | sys/dev/usb/usb.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/sys/dev/usb/usb.c b/sys/dev/usb/usb.c index b6f325ab0af..2d703ec4e33 100644 --- a/sys/dev/usb/usb.c +++ b/sys/dev/usb/usb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: usb.c,v 1.22 2002/07/11 03:11:17 nate Exp $ */ +/* $OpenBSD: usb.c,v 1.23 2002/07/25 02:18:11 nate Exp $ */ /* $NetBSD: usb.c,v 1.53 2001/01/23 17:04:30 augustss Exp $ */ /* $FreeBSD: src/sys/dev/usb/usb.c,v 1.20 1999/11/17 22:33:46 n_hibma Exp $ */ @@ -79,7 +79,7 @@ int uhcidebug; #ifdef OHCI_DEBUG int ohcidebug; #endif -/* +/* * 0 - do usual exploration * 1 - do not use timeout exploration * >1 - do no exploration @@ -116,7 +116,7 @@ struct usb_event_q { struct usb_event ue; SIMPLEQ_ENTRY(usb_event_q) next; }; -Static SIMPLEQ_HEAD(, usb_event_q) usb_events = +Static SIMPLEQ_HEAD(, usb_event_q) usb_events = SIMPLEQ_HEAD_INITIALIZER(usb_events); Static int usb_nevents = 0; Static struct selinfo usb_selevent; @@ -143,7 +143,7 @@ USB_ATTACH(usb) usbd_status err; int usbrev; struct usb_event ue; - + DPRINTF(("usbd_attach\n")); usbd_init(); @@ -175,13 +175,13 @@ USB_ATTACH(usb) dev = sc->sc_port.device; if (dev->hub == NULL) { sc->sc_dying = 1; - printf("%s: root device is not a hub\n", + printf("%s: root device is not a hub\n", USBDEVNAME(sc->sc_dev)); USB_ATTACH_ERROR_RETURN; } sc->sc_bus->root_hub = dev; #if 1 - /* + /* * Turning this code off will delay attachment of USB devices * until the USB event thread is running, which means that * the keyboard will not work until after cold boot. @@ -190,8 +190,8 @@ USB_ATTACH(usb) dev->hub->explore(sc->sc_bus->root_hub); #endif } else { - printf("%s: root hub problem, error=%d\n", - USBDEVNAME(sc->sc_dev), err); + printf("%s: root hub problem, error=%d\n", + USBDEVNAME(sc->sc_dev), err); sc->sc_dying = 1; } if (cold) @@ -382,7 +382,7 @@ usbioctl(dev_t devt, u_long cmd, caddr_t data, int flag, struct proc *p) case FIONBIO: /* All handled in the upper FS layer. */ return (0); - + case FIOASYNC: if (*(int *)data) usb_async_proc = p; @@ -426,7 +426,7 @@ usbioctl(dev_t devt, u_long cmd, caddr_t data, int flag, struct proc *p) DPRINTF(("usbioctl: USB_REQUEST addr=%d len=%d\n", addr, len)); if (len < 0 || len > 32768) return (EINVAL); - if (addr < 0 || addr >= USB_MAX_DEVICES || + if (addr < 0 || addr >= USB_MAX_DEVICES || sc->sc_bus->devices[addr] == 0) return (EINVAL); if (len != 0) { @@ -438,7 +438,7 @@ usbioctl(dev_t devt, u_long cmd, caddr_t data, int flag, struct proc *p) uio.uio_offset = 0; uio.uio_segflg = UIO_USERSPACE; uio.uio_rw = - ur->ucr_request.bmRequestType & UT_READ ? + ur->ucr_request.bmRequestType & UT_READ ? UIO_READ : UIO_WRITE; uio.uio_procp = p; ptr = malloc(len, M_TEMP, M_WAITOK); @@ -501,14 +501,14 @@ usbpoll(dev_t dev, int events, struct proc *p) if (minor(dev) == USB_DEV_MINOR) { revents = 0; mask = POLLIN | POLLRDNORM; - + s = splusb(); if (events & mask && usb_nevents > 0) revents |= events & mask; if (revents == 0 && events & mask) selrecord(p, &usb_selevent); splx(s); - + return (revents); } else { return (ENXIO); @@ -526,7 +526,7 @@ usb_discover(void *v) if (usb_noexplore > 1) return; #endif - /* + /* * We need mutual exclusion while traversing the device tree, * but this is guaranteed since this function is only called * from the event thread for the controller. @@ -576,7 +576,7 @@ usbd_add_drv_event(int type, usbd_device_handle udev, device_ptr_t dev) struct usb_event ue; ue.u.ue_driver.ue_cookie = udev->cookie; - strncpy(ue.u.ue_driver.ue_devname, USBDEVPTRNAME(dev), + strncpy(ue.u.ue_driver.ue_devname, USBDEVPTRNAME(dev), sizeof ue.u.ue_driver.ue_devname); usb_add_event(type, &ue); } |