Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/usb Whitespace.
details: https://anonhg.NetBSD.org/src/rev/bb3e13136ae3
branches: trunk
changeset: 784643:bb3e13136ae3
user: skrll <skrll%NetBSD.org@localhost>
date: Mon Feb 04 21:29:14 2013 +0000
description:
Whitespace.
diffstat:
sys/dev/usb/dwc_otg.c | 45 +++++++++++++++++++++++----------------------
sys/dev/usb/dwc_otgvar.h | 4 ++--
2 files changed, 25 insertions(+), 24 deletions(-)
diffs (163 lines):
diff -r 5080105f7e5b -r bb3e13136ae3 sys/dev/usb/dwc_otg.c
--- a/sys/dev/usb/dwc_otg.c Mon Feb 04 21:24:07 2013 +0000
+++ b/sys/dev/usb/dwc_otg.c Mon Feb 04 21:29:14 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dwc_otg.c,v 1.43 2013/02/04 21:24:07 skrll Exp $ */
+/* $NetBSD: dwc_otg.c,v 1.44 2013/02/04 21:29:14 skrll Exp $ */
/*-
* Copyright (c) 2012 Hans Petter Selasky. All rights reserved.
@@ -60,7 +60,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dwc_otg.c,v 1.43 2013/02/04 21:24:07 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dwc_otg.c,v 1.44 2013/02/04 21:29:14 skrll Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -351,15 +351,15 @@
Static void
dwc_otg_freem(struct usbd_bus *bus, usb_dma_t *dma)
{
- struct dwc_otg_softc *sc = bus->hci_private;
+ struct dwc_otg_softc *sc = bus->hci_private;
DPRINTF("\n");
- if (dma->block->flags & USB_DMA_RESERVE) {
- usb_reserve_freem(&sc->sc_dma_reserve, dma);
- return;
- }
- usb_freemem(&sc->sc_bus, dma);
+ if (dma->block->flags & USB_DMA_RESERVE) {
+ usb_reserve_freem(&sc->sc_dma_reserve, dma);
+ return;
+ }
+ usb_freemem(&sc->sc_bus, dma);
}
usbd_xfer_handle
@@ -678,7 +678,7 @@
Static void
dwc_otg_device_clear_toggle(usbd_pipe_handle pipe)
{
-
+
DPRINTF("toggle %d -> 0", pipe->endpoint->datatoggle);
pipe->endpoint->datatoggle = 0;
@@ -853,7 +853,7 @@
*buf = 0;
totlen = 1;
}
- break;
+ break;
case C(UR_GET_STATUS, UT_READ_DEVICE):
if (len > 1) {
USETW(((usb_status_t *)buf)->wStatus,UDS_SELF_POWERED);
@@ -871,13 +871,13 @@
DPRINTF("UR_SET_ADDRESS, UT_WRITE_DEVICE: addr %d\n",
value);
if (value >= USB_MAX_DEVICES)
- goto fail;
+ goto fail;
sc->sc_addr = value;
break;
case C(UR_SET_CONFIG, UT_WRITE_DEVICE):
if (value != 0 && value != 1)
- goto fail;
+ goto fail;
sc->sc_conf = value;
break;
@@ -913,7 +913,7 @@
DPRINTFN(9, "UR_CLEAR_FEATURE port=%d feature=%d\n",
index, value);
if (index < 1 || index > sc->sc_noport)
- goto fail;
+ goto fail;
switch (value) {
case UHF_PORT_ENABLE:
@@ -1137,12 +1137,12 @@
err = USBD_NORMAL_COMPLETION;
fail:
- mutex_enter(&sc->sc_lock);
+ mutex_enter(&sc->sc_lock);
xfer->status = err;
- usb_transfer_complete(xfer);
- mutex_exit(&sc->sc_lock);
-
- return USBD_IN_PROGRESS;
+ usb_transfer_complete(xfer);
+ mutex_exit(&sc->sc_lock);
+
+ return USBD_IN_PROGRESS;
}
Static void
@@ -3854,7 +3854,7 @@
// DPRINTF(("%s: xfer->length %d\n", __func__, xfer->length));
dxfer->queued = false;
-
+
/* get first again */
td = dxfer->td_transfer_first;
td->toggle = dpipe->pipe.endpoint->datatoggle;
@@ -3872,7 +3872,7 @@
hcchar |= HCCHAR_EPDIR_IN;
}
break;
-
+
case UE_INTERRUPT:
case UE_BULK:
case UE_ISOCHRONOUS:
@@ -4097,6 +4097,7 @@
sc->sc_bus.pipe_size = sizeof(struct dwc_otg_pipe);
sc->sc_noport = 1;
+ dotg_sc = sc;
callout_init(&sc->sc_timer, CALLOUT_MPSAFE);
@@ -4119,7 +4120,7 @@
usb_setup_reserve(sc->sc_dev, &sc->sc_dma_reserve, sc->sc_bus.dmatag,
USB_MEM_RESERVE);
-
+
#ifdef DOTG_COUNTERS
evcnt_attach_dynamic(&sc->sc_ev_intr, EVCNT_TYPE_INTR,
NULL, xname, "intr");
@@ -4141,7 +4142,7 @@
for (size_t i = DWC_OTG_INTRBITF; i < DWC_OTG_NINTRBITS; i++) {
evcnt_attach_dynamic(&sc->sc_ev_intr_bit[i], EVCNT_TYPE_INTR,
NULL, xname, intnames[i]);
- }
+ }
#endif
diff -r 5080105f7e5b -r bb3e13136ae3 sys/dev/usb/dwc_otgvar.h
--- a/sys/dev/usb/dwc_otgvar.h Mon Feb 04 21:24:07 2013 +0000
+++ b/sys/dev/usb/dwc_otgvar.h Mon Feb 04 21:29:14 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dwc_otgvar.h,v 1.10 2013/02/04 21:24:07 skrll Exp $ */
+/* $NetBSD: dwc_otgvar.h,v 1.11 2013/02/04 21:29:14 skrll Exp $ */
/* $FreeBSD: src/sys/dev/usb/controller/dwc_otg.h,v 1.12 2012/09/27 15:23:38 hselasky Exp $ */
/*-
@@ -209,7 +209,7 @@
pool_cache_t sc_tdpool;
pool_cache_t sc_xferpool;
-
+
#ifdef DOTG_COUNTERS
struct evcnt sc_ev_intr;
struct evcnt sc_ev_intr_bit[DWC_OTG_NINTRBITS];
Home |
Main Index |
Thread Index |
Old Index