summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoruebayasi <uebayasi@openbsd.org>2015-02-10 14:15:14 +0000
committeruebayasi <uebayasi@openbsd.org>2015-02-10 14:15:14 +0000
commit0395aa1e530e4f7d2e4bc263160df31d1e326c3d (patch)
treef14397527a7e9e3ae870032460fea0fb55caa346
parentthe stem of the b was not descending all the way to the baseline. (diff)
downloadwireguard-openbsd-0395aa1e530e4f7d2e4bc263160df31d1e326c3d.tar.xz
wireguard-openbsd-0395aa1e530e4f7d2e4bc263160df31d1e326c3d.zip
s/device_t/struct device */
-rw-r--r--sys/dev/usb/dwc2/dwc2.c28
-rw-r--r--sys/dev/usb/dwc2/dwc2.h8
-rw-r--r--sys/dev/usb/dwc2/dwc2_core.h6
-rw-r--r--sys/dev/usb/dwc2/dwc2var.h18
4 files changed, 30 insertions, 30 deletions
diff --git a/sys/dev/usb/dwc2/dwc2.c b/sys/dev/usb/dwc2/dwc2.c
index e47993b9f00..134ff2efa9f 100644
--- a/sys/dev/usb/dwc2/dwc2.c
+++ b/sys/dev/usb/dwc2/dwc2.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dwc2.c,v 1.8 2015/02/10 13:49:48 uebayasi Exp $ */
+/* $OpenBSD: dwc2.c,v 1.9 2015/02/10 14:15:14 uebayasi Exp $ */
/* $NetBSD: dwc2.c,v 1.32 2014/09/02 23:26:20 macallan Exp $ */
/*-
@@ -449,7 +449,7 @@ dwc2_timeout_task(void *addr)
usbd_status
dwc2_open(struct usbd_pipe * pipe)
{
- struct usbd_device * dev = pipe->device;
+ struct usbd_device *dev = pipe->device;
struct dwc2_softc *sc = DWC2_PIPE2SC(pipe);
struct dwc2_pipe *dpipe = DWC2_PIPE2DPIPE(pipe);
usb_endpoint_descriptor_t *ed = pipe->endpoint->edesc;
@@ -571,7 +571,7 @@ dwc2_abort_xfer(struct usbd_xfer *xfer, usbd_status status)
}
/*
- * Step 1: Make the stack ignore it and stop the callout.
+ * Step 1: Make the stack ignore it and stop the timeout.
*/
mtx_enter(&hsotg->lock);
xfer->hcflags |= UXFER_ABORTING;
@@ -1108,7 +1108,7 @@ static usbd_status
dwc2_device_intr_start(struct usbd_xfer *xfer)
{
struct dwc2_pipe *dpipe = DWC2_XFER2DPIPE(xfer)
- struct usbd_device * dev = dpipe->pipe.device;
+ struct usbd_device *dev = dpipe->pipe.device;
struct dwc2_softc *sc = dev->bus->hci_private;
usbd_status err;
@@ -1188,7 +1188,7 @@ usbd_status
dwc2_device_isoc_start(struct usbd_xfer *xfer)
{
struct dwc2_pipe *dpipe = DWC2_XFER2DPIPE(xfer);
- struct usbd_device * dev = dpipe->pipe.device;
+ struct usbd_device *dev = dpipe->pipe.device;
struct dwc2_softc *sc = dev->bus->hci_private;
usbd_status err;
@@ -1240,7 +1240,7 @@ dwc2_device_start(struct usbd_xfer *xfer)
struct dwc2_hsotg *hsotg = sc->sc_hsotg;
struct dwc2_hcd_urb *dwc2_urb;
- struct usbd_device * dev = xfer->pipe->device;
+ struct usbd_device *dev = xfer->pipe->device;
usb_endpoint_descriptor_t *ed = xfer->pipe->endpoint->edesc;
uint8_t addr = dev->address;
uint8_t xfertype = UE_GET_XFERTYPE(ed->bmAttributes);
@@ -1524,7 +1524,7 @@ dwc2_detach(struct dwc2_softc *sc, int flags)
}
bool
-dwc2_shutdown(device_t self, int flags)
+dwc2_shutdown(struct device *self, int flags)
{
struct dwc2_softc *sc = device_private(self);
@@ -1534,7 +1534,7 @@ dwc2_shutdown(device_t self, int flags)
}
void
-dwc2_childdet(device_t self, device_t child)
+dwc2_childdet(struct device *self, struct device *child)
{
struct dwc2_softc *sc = device_private(self);
@@ -1542,7 +1542,7 @@ dwc2_childdet(device_t self, device_t child)
}
int
-dwc2_activate(device_t self, enum devact act)
+dwc2_activate(struct device *self, enum devact act)
{
struct dwc2_softc *sc = device_private(self);
@@ -1552,7 +1552,7 @@ dwc2_activate(device_t self, enum devact act)
}
bool
-dwc2_resume(device_t dv, const pmf_qual_t *qual)
+dwc2_resume(struct device *dv, const pmf_qual_t *qual)
{
struct dwc2_softc *sc = device_private(dv);
@@ -1562,7 +1562,7 @@ dwc2_resume(device_t dv, const pmf_qual_t *qual)
}
bool
-dwc2_suspend(device_t dv, const pmf_qual_t *qual)
+dwc2_suspend(struct device *dv, const pmf_qual_t *qual)
{
struct dwc2_softc *sc = device_private(dv);
@@ -1648,7 +1648,7 @@ static const char * const intnames[32] = {
void
-dw_callout(void *arg)
+dw_timeout(void *arg)
{
struct delayed_work *dw = arg;
@@ -1660,7 +1660,7 @@ void dwc2_host_hub_info(struct dwc2_hsotg *hsotg, void *context, int *hub_addr,
{
struct usbd_xfer *xfer = context;
struct dwc2_pipe *dpipe = DWC2_XFER2DPIPE(xfer);
- struct usbd_device * dev = dpipe->pipe.device;
+ struct usbd_device *dev = dpipe->pipe.device;
*hub_addr = dev->myhsport->parent->address;
*hub_port = dev->myhsport->portno;
@@ -1670,7 +1670,7 @@ int dwc2_host_get_speed(struct dwc2_hsotg *hsotg, void *context)
{
struct usbd_xfer *xfer = context;
struct dwc2_pipe *dpipe = DWC2_XFER2DPIPE(xfer);
- struct usbd_device * dev = dpipe->pipe.device;
+ struct usbd_device *dev = dpipe->pipe.device;
return dev->speed;
}
diff --git a/sys/dev/usb/dwc2/dwc2.h b/sys/dev/usb/dwc2/dwc2.h
index 405045f6300..5ccb496763e 100644
--- a/sys/dev/usb/dwc2/dwc2.h
+++ b/sys/dev/usb/dwc2/dwc2.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: dwc2.h,v 1.4 2015/02/10 13:49:48 uebayasi Exp $ */
+/* $OpenBSD: dwc2.h,v 1.5 2015/02/10 14:15:14 uebayasi Exp $ */
/* $NetBSD: dwc2.h,v 1.4 2014/12/23 16:20:06 macallan Exp $ */
/*-
@@ -205,12 +205,12 @@ udelay(unsigned long usecs)
#define NS_TO_US(ns) ((ns + 500L) / 1000L)
-void dw_callout(void *);
+void dw_timeout(void *);
void dwc2_worker(struct task *, void *);
struct delayed_work {
struct task work;
- struct callout dw_timer;
+ struct timeout dw_timer;
struct taskq *dw_wq;
};
@@ -224,7 +224,7 @@ INIT_DELAYED_WORK(struct delayed_work *dw, void (*fn)(struct task *))
static inline void
queue_delayed_work(struct taskq *wq, struct delayed_work *dw, int j)
{
- timeout_reset(&dw->dw_timer, j, dw_callout, dw);
+ timeout_reset(&dw->dw_timer, j, dw_timeout, dw);
}
#endif
diff --git a/sys/dev/usb/dwc2/dwc2_core.h b/sys/dev/usb/dwc2/dwc2_core.h
index fabfd376ca2..bef355bdcbe 100644
--- a/sys/dev/usb/dwc2/dwc2_core.h
+++ b/sys/dev/usb/dwc2/dwc2_core.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: dwc2_core.h,v 1.5 2015/02/10 13:49:48 uebayasi Exp $ */
+/* $OpenBSD: dwc2_core.h,v 1.6 2015/02/10 14:15:14 uebayasi Exp $ */
/* $NetBSD: dwc2_core.h,v 1.5 2014/04/03 06:34:58 skrll Exp $ */
/*
@@ -405,7 +405,7 @@ struct dwc2_hw_params {
* @frame_list_dma: Frame list DMA address
*/
struct dwc2_hsotg {
- device_t dev;
+ struct device *dev;
struct dwc2_softc *hsotg_sc;
/** Params detected from hardware */
struct dwc2_hw_params hw_params;
@@ -418,7 +418,7 @@ struct dwc2_hsotg {
struct taskq *wq_otg;
struct task wf_otg;
- struct callout wkp_timer;
+ struct timeout wkp_timer;
enum dwc2_lx_state lx_state;
union dwc2_hcd_internal_flags {
diff --git a/sys/dev/usb/dwc2/dwc2var.h b/sys/dev/usb/dwc2/dwc2var.h
index 665d23c34f4..b54fee3eef4 100644
--- a/sys/dev/usb/dwc2/dwc2var.h
+++ b/sys/dev/usb/dwc2/dwc2var.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: dwc2var.h,v 1.5 2015/02/10 13:49:48 uebayasi Exp $ */
+/* $OpenBSD: dwc2var.h,v 1.6 2015/02/10 14:15:14 uebayasi Exp $ */
/* $NetBSD: dwc2var.h,v 1.3 2013/10/22 12:57:40 skrll Exp $ */
/*-
@@ -72,7 +72,7 @@ struct dwc2_pipe {
typedef struct dwc2_softc {
- device_t sc_dev;
+ struct device *sc_dev;
bus_space_tag_t sc_iot;
bus_space_handle_t sc_ioh;
@@ -91,9 +91,9 @@ typedef struct dwc2_softc {
bool sc_hcdenabled;
void *sc_rhc_si;
- struct usbd_xfer * sc_intrxfer;
+ struct usbd_xfer *sc_intrxfer;
- device_t sc_child; /* /dev/usb# device */
+ struct device *sc_child; /* /dev/usb# device */
char sc_dying;
struct usb_dma_reserve sc_dma_reserve;
@@ -114,11 +114,11 @@ typedef struct dwc2_softc {
int dwc2_init(struct dwc2_softc *);
int dwc2_intr(void *);
int dwc2_detach(dwc2_softc_t *, int);
-bool dwc2_shutdown(device_t, int);
-void dwc2_childdet(device_t, device_t);
-int dwc2_activate(device_t, enum devact);
-bool dwc2_resume(device_t, const pmf_qual_t *);
-bool dwc2_suspend(device_t, const pmf_qual_t *);
+bool dwc2_shutdown(struct device *, int);
+void dwc2_childdet(struct device *, struct device *);
+int dwc2_activate(struct device *, enum devact);
+bool dwc2_resume(struct device *, const pmf_qual_t *);
+bool dwc2_suspend(struct device *, const pmf_qual_t *);
void dwc2_worker(struct task *, void *);