summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/usb.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/usb/usb.c')
-rw-r--r--sys/dev/usb/usb.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/sys/dev/usb/usb.c b/sys/dev/usb/usb.c
index 0798248..778c429 100644
--- a/sys/dev/usb/usb.c
+++ b/sys/dev/usb/usb.c
@@ -101,7 +101,7 @@ extern int uhcidebug;
#ifdef OHCI_DEBUG
extern int ohcidebug;
#endif
-/*
+/*
* 0 - do usual exploration
* 1 - do not use timeout exploration
* >1 - do no exploration
@@ -125,7 +125,7 @@ struct usb_softc {
#if defined(__NetBSD__) || defined(__OpenBSD__)
cdev_decl(usb);
#elif defined(__FreeBSD__)
-d_open_t usbopen;
+d_open_t usbopen;
d_close_t usbclose;
d_read_t usbread;
d_ioctl_t usbioctl;
@@ -237,13 +237,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.
@@ -256,8 +256,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)
@@ -429,7 +429,7 @@ usbioctl(dev_t devt, u_long cmd, caddr_t data, int flag, usb_proc_ptr p)
case FIONBIO:
/* All handled in the upper FS layer. */
return (0);
-
+
case FIOASYNC:
if (*(int *)data)
usb_async_proc = p->td_proc;
@@ -448,7 +448,7 @@ usbioctl(dev_t devt, u_long cmd, caddr_t data, int flag, usb_proc_ptr p)
return (EIO);
switch (cmd) {
-#if defined(__FreeBSD__)
+#if defined(__FreeBSD__)
/* This part should be deleted */
case USB_DISCOVER:
break;
@@ -478,7 +478,7 @@ usbioctl(dev_t devt, u_long cmd, caddr_t data, int flag, usb_proc_ptr 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) {
@@ -490,7 +490,7 @@ usbioctl(dev_t devt, u_long cmd, caddr_t data, int flag, usb_proc_ptr p)
uio.uio_offset = 0;
uio.uio_segflg = UIO_USERSPACE;
uio.uio_rw =
- ur->request.bmRequestType & UT_READ ?
+ ur->request.bmRequestType & UT_READ ?
UIO_READ : UIO_WRITE;
uio.uio_procp = p;
ptr = malloc(len, M_TEMP, M_WAITOK);
@@ -553,14 +553,14 @@ usbpoll(dev_t dev, int events, usb_proc_ptr p)
if (unit == 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 {
#if defined(__FreeBSD__)
@@ -582,7 +582,7 @@ usb_discover(void *v)
int s;
#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.
@@ -650,7 +650,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);
}
OpenPOWER on IntegriCloud