summaryrefslogtreecommitdiff
path: root/sys/dev/usb
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/usb')
-rw-r--r--sys/dev/usb/ehci.c4
-rw-r--r--sys/dev/usb/ehcivar.h6
-rw-r--r--sys/dev/usb/if_atu.c4
-rw-r--r--sys/dev/usb/if_aue.c16
-rw-r--r--sys/dev/usb/if_axe.c16
-rw-r--r--sys/dev/usb/if_cdce.c4
-rw-r--r--sys/dev/usb/if_cue.c4
-rw-r--r--sys/dev/usb/if_kue.c4
-rw-r--r--sys/dev/usb/if_ral.c4
-rw-r--r--sys/dev/usb/if_rum.c4
-rw-r--r--sys/dev/usb/if_uath.c6
-rw-r--r--sys/dev/usb/if_udav.c16
-rw-r--r--sys/dev/usb/if_upl.c4
-rw-r--r--sys/dev/usb/if_url.c20
-rw-r--r--sys/dev/usb/if_wi_usb.c4
-rw-r--r--sys/dev/usb/if_zyd.c4
-rw-r--r--sys/dev/usb/moscom.c6
-rw-r--r--sys/dev/usb/ohci.c4
-rw-r--r--sys/dev/usb/ohcivar.h6
-rw-r--r--sys/dev/usb/uark.c6
-rw-r--r--sys/dev/usb/uaudio.c8
-rw-r--r--sys/dev/usb/uberry.c4
-rw-r--r--sys/dev/usb/ubsa.c6
-rw-r--r--sys/dev/usb/ubt.c4
-rw-r--r--sys/dev/usb/ucom.c4
-rw-r--r--sys/dev/usb/ucycom.c6
-rw-r--r--sys/dev/usb/udcf.c4
-rw-r--r--sys/dev/usb/udsbr.c4
-rw-r--r--sys/dev/usb/ueagle.c4
-rw-r--r--sys/dev/usb/uftdi.c8
-rw-r--r--sys/dev/usb/ugen.c4
-rw-r--r--sys/dev/usb/uhci.c4
-rw-r--r--sys/dev/usb/uhcivar.h6
-rw-r--r--sys/dev/usb/uhid.c4
-rw-r--r--sys/dev/usb/uhidev.c8
-rw-r--r--sys/dev/usb/uhub.c4
-rw-r--r--sys/dev/usb/uipaq.c8
-rw-r--r--sys/dev/usb/ukbd.c4
-rw-r--r--sys/dev/usb/ulpt.c4
-rw-r--r--sys/dev/usb/umassvar.h4
-rw-r--r--sys/dev/usb/umct.c6
-rw-r--r--sys/dev/usb/umidi.c4
-rw-r--r--sys/dev/usb/umodem.c6
-rw-r--r--sys/dev/usb/ums.c4
-rw-r--r--sys/dev/usb/umsm.c6
-rw-r--r--sys/dev/usb/uow.c4
-rw-r--r--sys/dev/usb/uplcom.c6
-rw-r--r--sys/dev/usb/urio.c4
-rw-r--r--sys/dev/usb/usb.c8
-rw-r--r--sys/dev/usb/usb_port.h4
-rw-r--r--sys/dev/usb/usb_subr.c14
-rw-r--r--sys/dev/usb/usbdi.h4
-rw-r--r--sys/dev/usb/usbdi_util.c6
-rw-r--r--sys/dev/usb/usbdi_util.h6
-rw-r--r--sys/dev/usb/usbdivar.h8
-rw-r--r--sys/dev/usb/usbf_subr.c12
-rw-r--r--sys/dev/usb/usbfvar.h4
-rw-r--r--sys/dev/usb/uscanner.c4
-rw-r--r--sys/dev/usb/uslcom.c6
-rw-r--r--sys/dev/usb/usscanner.c6
-rw-r--r--sys/dev/usb/uts.c6
-rw-r--r--sys/dev/usb/uvisor.c8
-rw-r--r--sys/dev/usb/uvscom.c6
-rw-r--r--sys/dev/usb/uyap.c4
64 files changed, 194 insertions, 196 deletions
diff --git a/sys/dev/usb/ehci.c b/sys/dev/usb/ehci.c
index 75e18fee719..4d4936a6d08 100644
--- a/sys/dev/usb/ehci.c
+++ b/sys/dev/usb/ehci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ehci.c,v 1.73 2007/06/10 14:49:00 mbalmer Exp $ */
+/* $OpenBSD: ehci.c,v 1.74 2007/06/12 16:26:36 mbalmer Exp $ */
/* $NetBSD: ehci.c,v 1.66 2004/06/30 03:11:56 mycroft Exp $ */
/*
@@ -918,7 +918,7 @@ ehci_detach(struct ehci_softc *sc, int flags)
int
-ehci_activate(device_ptr_t self, enum devact act)
+ehci_activate(struct device *self, enum devact act)
{
struct ehci_softc *sc = (struct ehci_softc *)self;
int rv = 0;
diff --git a/sys/dev/usb/ehcivar.h b/sys/dev/usb/ehcivar.h
index 4e34781c769..27039491533 100644
--- a/sys/dev/usb/ehcivar.h
+++ b/sys/dev/usb/ehcivar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ehcivar.h,v 1.12 2007/06/10 10:15:35 mbalmer Exp $ */
+/* $OpenBSD: ehcivar.h,v 1.13 2007/06/12 16:26:36 mbalmer Exp $ */
/* $NetBSD: ehcivar.h,v 1.19 2005/04/29 15:04:29 augustss Exp $ */
/*
@@ -136,7 +136,7 @@ typedef struct ehci_softc {
struct timeout sc_tmo_pcd;
struct timeout sc_tmo_intrlist;
- device_ptr_t sc_child; /* /dev/usb# device */
+ struct device *sc_child; /* /dev/usb# device */
char sc_dying;
} ehci_softc_t;
@@ -157,5 +157,5 @@ typedef struct ehci_softc {
usbd_status ehci_init(ehci_softc_t *);
int ehci_intr(void *);
int ehci_detach(ehci_softc_t *, int);
-int ehci_activate(device_ptr_t, enum devact);
+int ehci_activate(struct device *, enum devact);
void ehci_shutdown(void *);
diff --git a/sys/dev/usb/if_atu.c b/sys/dev/usb/if_atu.c
index 50ce647cb9e..59ef578ee88 100644
--- a/sys/dev/usb/if_atu.c
+++ b/sys/dev/usb/if_atu.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_atu.c,v 1.83 2007/06/10 14:49:00 mbalmer Exp $ */
+/* $OpenBSD: if_atu.c,v 1.84 2007/06/12 16:26:36 mbalmer Exp $ */
/*
* Copyright (c) 2003, 2004
* Daan Vreeken <Danovitsch@Vitsch.net>. All rights reserved.
@@ -1503,7 +1503,7 @@ atu_detach(struct device *self, int flags)
}
int
-atu_activate(device_ptr_t self, enum devact act)
+atu_activate(struct device *self, enum devact act)
{
struct atu_softc *sc = (struct atu_softc *)self;
diff --git a/sys/dev/usb/if_aue.c b/sys/dev/usb/if_aue.c
index 5f7cc989d96..56a792371c5 100644
--- a/sys/dev/usb/if_aue.c
+++ b/sys/dev/usb/if_aue.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_aue.c,v 1.62 2007/06/11 05:42:53 mbalmer Exp $ */
+/* $OpenBSD: if_aue.c,v 1.63 2007/06/12 16:26:36 mbalmer Exp $ */
/* $NetBSD: if_aue.c,v 1.82 2003/03/05 17:37:36 shiba Exp $ */
/*
* Copyright (c) 1997, 1998, 1999, 2000
@@ -234,9 +234,9 @@ void aue_ifmedia_sts(struct ifnet *, struct ifmediareq *);
int aue_eeprom_getword(struct aue_softc *, int);
void aue_read_mac(struct aue_softc *, u_char *);
-int aue_miibus_readreg(device_ptr_t, int, int);
-void aue_miibus_writereg(device_ptr_t, int, int, int);
-void aue_miibus_statchg(device_ptr_t);
+int aue_miibus_readreg(struct device *, int, int);
+void aue_miibus_writereg(struct device *, int, int, int);
+void aue_miibus_statchg(struct device *);
void aue_lock_mii(struct aue_softc *);
void aue_unlock_mii(struct aue_softc *);
@@ -426,7 +426,7 @@ aue_unlock_mii(struct aue_softc *sc)
}
int
-aue_miibus_readreg(device_ptr_t dev, int phy, int reg)
+aue_miibus_readreg(struct device *dev, int phy, int reg)
{
struct aue_softc *sc = (void *)dev;
int i;
@@ -480,7 +480,7 @@ aue_miibus_readreg(device_ptr_t dev, int phy, int reg)
}
void
-aue_miibus_writereg(device_ptr_t dev, int phy, int reg, int data)
+aue_miibus_writereg(struct device *dev, int phy, int reg, int data)
{
struct aue_softc *sc = (void *)dev;
int i;
@@ -514,7 +514,7 @@ aue_miibus_writereg(device_ptr_t dev, int phy, int reg, int data)
}
void
-aue_miibus_statchg(device_ptr_t dev)
+aue_miibus_statchg(struct device *dev)
{
struct aue_softc *sc = (void *)dev;
struct mii_data *mii = GET_MII(sc);
@@ -887,7 +887,7 @@ aue_detach(struct device *self, int flags)
}
int
-aue_activate(device_ptr_t self, enum devact act)
+aue_activate(struct device *self, enum devact act)
{
struct aue_softc *sc = (struct aue_softc *)self;
diff --git a/sys/dev/usb/if_axe.c b/sys/dev/usb/if_axe.c
index 800ca4ee07f..79aab852469 100644
--- a/sys/dev/usb/if_axe.c
+++ b/sys/dev/usb/if_axe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_axe.c,v 1.75 2007/06/11 05:42:53 mbalmer Exp $ */
+/* $OpenBSD: if_axe.c,v 1.76 2007/06/12 16:26:36 mbalmer Exp $ */
/*
* Copyright (c) 2005, 2006, 2007 Jonathan Gray <jsg@openbsd.org>
@@ -188,9 +188,9 @@ int axe_ioctl(struct ifnet *, u_long, caddr_t);
void axe_init(void *);
void axe_stop(struct axe_softc *);
void axe_watchdog(struct ifnet *);
-int axe_miibus_readreg(device_ptr_t, int, int);
-void axe_miibus_writereg(device_ptr_t, int, int, int);
-void axe_miibus_statchg(device_ptr_t);
+int axe_miibus_readreg(struct device *, int, int);
+void axe_miibus_writereg(struct device *, int, int, int);
+void axe_miibus_statchg(struct device *);
int axe_cmd(struct axe_softc *, int, int, int, void *);
int axe_ifmedia_upd(struct ifnet *);
void axe_ifmedia_sts(struct ifnet *, struct ifmediareq *);
@@ -246,7 +246,7 @@ axe_cmd(struct axe_softc *sc, int cmd, int index, int val, void *buf)
}
int
-axe_miibus_readreg(device_ptr_t dev, int phy, int reg)
+axe_miibus_readreg(struct device *dev, int phy, int reg)
{
struct axe_softc *sc = (void *)dev;
usbd_status err;
@@ -294,7 +294,7 @@ axe_miibus_readreg(device_ptr_t dev, int phy, int reg)
}
void
-axe_miibus_writereg(device_ptr_t dev, int phy, int reg, int val)
+axe_miibus_writereg(struct device *dev, int phy, int reg, int val)
{
struct axe_softc *sc = (void *)dev;
usbd_status err;
@@ -318,7 +318,7 @@ axe_miibus_writereg(device_ptr_t dev, int phy, int reg, int val)
}
void
-axe_miibus_statchg(device_ptr_t dev)
+axe_miibus_statchg(struct device *dev)
{
struct axe_softc *sc = (void *)dev;
struct mii_data *mii = GET_MII(sc);
@@ -794,7 +794,7 @@ axe_detach(struct device *self, int flags)
}
int
-axe_activate(device_ptr_t self, enum devact act)
+axe_activate(struct device *self, enum devact act)
{
struct axe_softc *sc = (struct axe_softc *)self;
diff --git a/sys/dev/usb/if_cdce.c b/sys/dev/usb/if_cdce.c
index f620294363f..e96a5d0530b 100644
--- a/sys/dev/usb/if_cdce.c
+++ b/sys/dev/usb/if_cdce.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_cdce.c,v 1.30 2007/06/10 14:49:00 mbalmer Exp $ */
+/* $OpenBSD: if_cdce.c,v 1.31 2007/06/12 16:26:36 mbalmer Exp $ */
/*
* Copyright (c) 1997, 1998, 1999, 2000-2003 Bill Paul <wpaul@windriver.com>
@@ -780,7 +780,7 @@ cdce_get_desc(usbd_device_handle dev, int type, int subtype)
}
int
-cdce_activate(device_ptr_t self, enum devact act)
+cdce_activate(struct device *self, enum devact act)
{
struct cdce_softc *sc = (struct cdce_softc *)self;
diff --git a/sys/dev/usb/if_cue.c b/sys/dev/usb/if_cue.c
index 5bce284aff4..350d99f4d6e 100644
--- a/sys/dev/usb/if_cue.c
+++ b/sys/dev/usb/if_cue.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_cue.c,v 1.41 2007/06/10 14:49:00 mbalmer Exp $ */
+/* $OpenBSD: if_cue.c,v 1.42 2007/06/12 16:26:36 mbalmer Exp $ */
/* $NetBSD: if_cue.c,v 1.40 2002/07/11 21:14:26 augustss Exp $ */
/*
* Copyright (c) 1997, 1998, 1999, 2000
@@ -586,7 +586,7 @@ cue_detach(struct device *self, int flags)
}
int
-cue_activate(device_ptr_t self, enum devact act)
+cue_activate(struct device *self, enum devact act)
{
struct cue_softc *sc = (struct cue_softc *)self;
diff --git a/sys/dev/usb/if_kue.c b/sys/dev/usb/if_kue.c
index 45321dfa60e..42cb784e98a 100644
--- a/sys/dev/usb/if_kue.c
+++ b/sys/dev/usb/if_kue.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_kue.c,v 1.52 2007/06/10 14:49:00 mbalmer Exp $ */
+/* $OpenBSD: if_kue.c,v 1.53 2007/06/12 16:26:36 mbalmer Exp $ */
/* $NetBSD: if_kue.c,v 1.50 2002/07/16 22:00:31 augustss Exp $ */
/*
* Copyright (c) 1997, 1998, 1999, 2000
@@ -581,7 +581,7 @@ kue_detach(struct device *self, int flags)
}
int
-kue_activate(device_ptr_t self, enum devact act)
+kue_activate(struct device *self, enum devact act)
{
struct kue_softc *sc = (struct kue_softc *)self;
diff --git a/sys/dev/usb/if_ral.c b/sys/dev/usb/if_ral.c
index f75a39586c9..184c8dfffc7 100644
--- a/sys/dev/usb/if_ral.c
+++ b/sys/dev/usb/if_ral.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ral.c,v 1.97 2007/06/10 14:49:00 mbalmer Exp $ */
+/* $OpenBSD: if_ral.c,v 1.98 2007/06/12 16:26:36 mbalmer Exp $ */
/*-
* Copyright (c) 2005, 2006
@@ -2176,7 +2176,7 @@ ural_amrr_update(usbd_xfer_handle xfer, usbd_private_handle priv,
}
int
-ural_activate(device_ptr_t self, enum devact act)
+ural_activate(struct device *self, enum devact act)
{
switch (act) {
case DVACT_ACTIVATE:
diff --git a/sys/dev/usb/if_rum.c b/sys/dev/usb/if_rum.c
index d3aa9b5c747..d01aa1f4749 100644
--- a/sys/dev/usb/if_rum.c
+++ b/sys/dev/usb/if_rum.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_rum.c,v 1.62 2007/06/10 14:49:00 mbalmer Exp $ */
+/* $OpenBSD: if_rum.c,v 1.63 2007/06/12 16:26:36 mbalmer Exp $ */
/*-
* Copyright (c) 2005-2007 Damien Bergamini <damien.bergamini@free.fr>
@@ -2242,7 +2242,7 @@ rum_amrr_update(usbd_xfer_handle xfer, usbd_private_handle priv,
}
int
-rum_activate(device_ptr_t self, enum devact act)
+rum_activate(struct device *self, enum devact act)
{
switch (act) {
case DVACT_ACTIVATE:
diff --git a/sys/dev/usb/if_uath.c b/sys/dev/usb/if_uath.c
index aaa6ad808c6..3ee0f7c2cef 100644
--- a/sys/dev/usb/if_uath.c
+++ b/sys/dev/usb/if_uath.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_uath.c,v 1.24 2007/06/10 14:49:00 mbalmer Exp $ */
+/* $OpenBSD: if_uath.c,v 1.25 2007/06/12 16:26:36 mbalmer Exp $ */
/*-
* Copyright (c) 2006
@@ -184,7 +184,7 @@ int uath_switch_channel(struct uath_softc *, struct ieee80211_channel *);
int uath_init(struct ifnet *);
void uath_stop(struct ifnet *, int);
int uath_loadfirmware(struct uath_softc *, const u_char *, int);
-int uath_activate(device_ptr_t, enum devact);
+int uath_activate(struct device *, enum devact);
USB_DECLARE_DRIVER(uath);
@@ -2115,7 +2115,7 @@ fail1: return error;
}
int
-uath_activate(device_ptr_t self, enum devact act)
+uath_activate(struct device *self, enum devact act)
{
switch (act) {
case DVACT_ACTIVATE:
diff --git a/sys/dev/usb/if_udav.c b/sys/dev/usb/if_udav.c
index 1c4b30b453a..6957c9dd3b7 100644
--- a/sys/dev/usb/if_udav.c
+++ b/sys/dev/usb/if_udav.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_udav.c,v 1.31 2007/06/11 05:42:53 mbalmer Exp $ */
+/* $OpenBSD: if_udav.c,v 1.32 2007/06/12 16:26:36 mbalmer Exp $ */
/* $NetBSD: if_udav.c,v 1.3 2004/04/23 17:25:25 itojun Exp $ */
/* $nabe: if_udav.c,v 1.3 2003/08/21 16:57:19 nabe Exp $ */
/*
@@ -107,9 +107,9 @@ int udav_ifmedia_change(struct ifnet *);
void udav_ifmedia_status(struct ifnet *, struct ifmediareq *);
void udav_lock_mii(struct udav_softc *);
void udav_unlock_mii(struct udav_softc *);
-int udav_miibus_readreg(device_ptr_t, int, int);
-void udav_miibus_writereg(device_ptr_t, int, int, int);
-void udav_miibus_statchg(device_ptr_t);
+int udav_miibus_readreg(struct device *, int, int);
+void udav_miibus_writereg(struct device *, int, int, int);
+void udav_miibus_statchg(struct device *);
int udav_init(struct ifnet *);
void udav_setmulti(struct udav_softc *);
void udav_reset(struct udav_softc *);
@@ -712,7 +712,7 @@ udav_reset(struct udav_softc *sc)
}
int
-udav_activate(device_ptr_t self, enum devact act)
+udav_activate(struct device *self, enum devact act)
{
struct udav_softc *sc = (struct udav_softc *)self;
@@ -1515,7 +1515,7 @@ udav_unlock_mii(struct udav_softc *sc)
}
int
-udav_miibus_readreg(device_ptr_t dev, int phy, int reg)
+udav_miibus_readreg(struct device *dev, int phy, int reg)
{
struct udav_softc *sc;
u_int8_t val[2];
@@ -1572,7 +1572,7 @@ udav_miibus_readreg(device_ptr_t dev, int phy, int reg)
}
void
-udav_miibus_writereg(device_ptr_t dev, int phy, int reg, int data)
+udav_miibus_writereg(struct device *dev, int phy, int reg, int data)
{
struct udav_softc *sc;
u_int8_t val[2];
@@ -1625,7 +1625,7 @@ udav_miibus_writereg(device_ptr_t dev, int phy, int reg, int data)
}
void
-udav_miibus_statchg(device_ptr_t dev)
+udav_miibus_statchg(struct device *dev)
{
#ifdef UDAV_DEBUG
struct udav_softc *sc;
diff --git a/sys/dev/usb/if_upl.c b/sys/dev/usb/if_upl.c
index 702a036aba5..f7103f2a1c3 100644
--- a/sys/dev/usb/if_upl.c
+++ b/sys/dev/usb/if_upl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_upl.c,v 1.35 2007/06/10 14:49:00 mbalmer Exp $ */
+/* $OpenBSD: if_upl.c,v 1.36 2007/06/12 16:26:36 mbalmer Exp $ */
/* $NetBSD: if_upl.c,v 1.19 2002/07/11 21:14:26 augustss Exp $ */
/*
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -354,7 +354,7 @@ upl_detach(struct device *self, int flags)
}
int
-upl_activate(device_ptr_t self, enum devact act)
+upl_activate(struct device *self, enum devact act)
{
struct upl_softc *sc = (struct upl_softc *)self;
diff --git a/sys/dev/usb/if_url.c b/sys/dev/usb/if_url.c
index 95a45075f4a..c94e0bdc64c 100644
--- a/sys/dev/usb/if_url.c
+++ b/sys/dev/usb/if_url.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_url.c,v 1.45 2007/06/11 05:42:54 mbalmer Exp $ */
+/* $OpenBSD: if_url.c,v 1.46 2007/06/12 16:26:36 mbalmer Exp $ */
/* $NetBSD: if_url.c,v 1.6 2002/09/29 10:19:21 martin Exp $ */
/*
* Copyright (c) 2001, 2002
@@ -105,9 +105,9 @@ int url_ifmedia_change(struct ifnet *);
void url_ifmedia_status(struct ifnet *, struct ifmediareq *);
void url_lock_mii(struct url_softc *);
void url_unlock_mii(struct url_softc *);
-int url_int_miibus_readreg(device_ptr_t, int, int);
-void url_int_miibus_writereg(device_ptr_t, int, int, int);
-void url_miibus_statchg(device_ptr_t);
+int url_int_miibus_readreg(struct device *, int, int);
+void url_int_miibus_writereg(struct device *, int, int, int);
+void url_miibus_statchg(struct device *);
int url_init(struct ifnet *);
void url_setmulti(struct url_softc *);
void url_reset(struct url_softc *);
@@ -593,7 +593,7 @@ url_reset(struct url_softc *sc)
}
int
-url_activate(device_ptr_t self, enum devact act)
+url_activate(struct device *self, enum devact act)
{
struct url_softc *sc = (struct url_softc *)self;
@@ -1403,7 +1403,7 @@ url_unlock_mii(struct url_softc *sc)
}
int
-url_int_miibus_readreg(device_ptr_t dev, int phy, int reg)
+url_int_miibus_readreg(struct device *dev, int phy, int reg)
{
struct url_softc *sc;
u_int16_t val;
@@ -1476,7 +1476,7 @@ url_int_miibus_readreg(device_ptr_t dev, int phy, int reg)
}
void
-url_int_miibus_writereg(device_ptr_t dev, int phy, int reg, int data)
+url_int_miibus_writereg(struct device *dev, int phy, int reg, int data)
{
struct url_softc *sc;
@@ -1543,7 +1543,7 @@ url_int_miibus_writereg(device_ptr_t dev, int phy, int reg, int data)
}
void
-url_miibus_statchg(device_ptr_t dev)
+url_miibus_statchg(struct device *dev)
{
#ifdef URL_DEBUG
struct url_softc *sc;
@@ -1562,7 +1562,7 @@ url_miibus_statchg(device_ptr_t dev)
* external PHYs support, but not test.
*/
int
-url_ext_miibus_redreg(device_ptr_t dev, int phy, int reg)
+url_ext_miibus_redreg(struct device *dev, int phy, int reg)
{
struct url_softc *sc = (void *)dev;
u_int16_t val;
@@ -1606,7 +1606,7 @@ url_ext_miibus_redreg(device_ptr_t dev, int phy, int reg)
}
void
-url_ext_miibus_writereg(device_ptr_t dev, int phy, int reg, int data)
+url_ext_miibus_writereg(struct device *dev, int phy, int reg, int data)
{
struct url_softc *sc = (void *)dev;
diff --git a/sys/dev/usb/if_wi_usb.c b/sys/dev/usb/if_wi_usb.c
index 3c1ebc94b72..79f93264fd1 100644
--- a/sys/dev/usb/if_wi_usb.c
+++ b/sys/dev/usb/if_wi_usb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_wi_usb.c,v 1.40 2007/06/10 14:49:00 mbalmer Exp $ */
+/* $OpenBSD: if_wi_usb.c,v 1.41 2007/06/12 16:26:36 mbalmer Exp $ */
/*
* Copyright (c) 2003 Dale Rahn. All rights reserved.
@@ -1330,7 +1330,7 @@ wi_get_fid_usb(struct wi_softc *sc, int fid)
}
int
-wi_usb_activate(device_ptr_t self, enum devact act)
+wi_usb_activate(struct device *self, enum devact act)
{
struct wi_usb_softc *sc = (struct wi_usb_softc *)self;
diff --git a/sys/dev/usb/if_zyd.c b/sys/dev/usb/if_zyd.c
index 7f822b05b8f..e782e40e8ea 100644
--- a/sys/dev/usb/if_zyd.c
+++ b/sys/dev/usb/if_zyd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_zyd.c,v 1.56 2007/06/10 14:49:00 mbalmer Exp $ */
+/* $OpenBSD: if_zyd.c,v 1.57 2007/06/12 16:26:36 mbalmer Exp $ */
/*-
* Copyright (c) 2006 by Damien Bergamini <damien.bergamini@free.fr>
@@ -2526,7 +2526,7 @@ zyd_newassoc(struct ieee80211com *ic, struct ieee80211_node *ni, int isnew)
}
int
-zyd_activate(device_ptr_t self, enum devact act)
+zyd_activate(struct device *self, enum devact act)
{
switch (act) {
case DVACT_ACTIVATE:
diff --git a/sys/dev/usb/moscom.c b/sys/dev/usb/moscom.c
index eb1e77790a6..37302547cad 100644
--- a/sys/dev/usb/moscom.c
+++ b/sys/dev/usb/moscom.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: moscom.c,v 1.7 2007/06/10 14:49:00 mbalmer Exp $ */
+/* $OpenBSD: moscom.c,v 1.8 2007/06/12 16:26:36 mbalmer Exp $ */
/*
* Copyright (c) 2006 Jonathan Gray <jsg@openbsd.org>
@@ -136,7 +136,7 @@ struct moscom_softc {
struct device sc_dev;
usbd_device_handle sc_udev;
usbd_interface_handle sc_iface;
- device_ptr_t sc_subdev;
+ struct device * sc_subdev;
u_char sc_msr;
u_char sc_lsr;
@@ -276,7 +276,7 @@ moscom_detach(struct device *self, int flags)
}
int
-moscom_activate(device_ptr_t self, enum devact act)
+moscom_activate(struct device *self, enum devact act)
{
struct moscom_softc *sc = (struct moscom_softc *)self;
int rv = 0;
diff --git a/sys/dev/usb/ohci.c b/sys/dev/usb/ohci.c
index fcb1ef12ce8..64328cfd54f 100644
--- a/sys/dev/usb/ohci.c
+++ b/sys/dev/usb/ohci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ohci.c,v 1.81 2007/06/10 14:49:00 mbalmer Exp $ */
+/* $OpenBSD: ohci.c,v 1.82 2007/06/12 16:26:36 mbalmer Exp $ */
/* $NetBSD: ohci.c,v 1.139 2003/02/22 05:24:16 tsutsui Exp $ */
/* $FreeBSD: src/sys/dev/usb/ohci.c,v 1.22 1999/11/17 22:33:40 n_hibma Exp $ */
@@ -311,7 +311,7 @@ struct usbd_pipe_methods ohci_device_isoc_methods = {
};
int
-ohci_activate(device_ptr_t self, enum devact act)
+ohci_activate(struct device *self, enum devact act)
{
struct ohci_softc *sc = (struct ohci_softc *)self;
int rv = 0;
diff --git a/sys/dev/usb/ohcivar.h b/sys/dev/usb/ohcivar.h
index 9f6930deb8d..1ab29845a3e 100644
--- a/sys/dev/usb/ohcivar.h
+++ b/sys/dev/usb/ohcivar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ohcivar.h,v 1.23 2007/06/10 10:15:35 mbalmer Exp $ */
+/* $OpenBSD: ohcivar.h,v 1.24 2007/06/12 16:26:36 mbalmer Exp $ */
/* $NetBSD: ohcivar.h,v 1.32 2003/02/22 05:24:17 tsutsui Exp $ */
/* $FreeBSD: src/sys/dev/usb/ohcivar.h,v 1.13 1999/11/17 22:33:41 n_hibma Exp $ */
@@ -137,7 +137,7 @@ typedef struct ohci_softc {
struct timeout sc_tmo_rhsc;
- device_ptr_t sc_child;
+ struct device *sc_child;
char sc_dying;
} ohci_softc_t;
@@ -152,5 +152,5 @@ usbd_status ohci_handover(ohci_softc_t *);
usbd_status ohci_init(ohci_softc_t *);
int ohci_intr(void *);
int ohci_detach(ohci_softc_t *, int);
-int ohci_activate(device_ptr_t, enum devact);
+int ohci_activate(struct device *, enum devact);
void ohci_power(int, void *);
diff --git a/sys/dev/usb/uark.c b/sys/dev/usb/uark.c
index cde4c84d2f4..693d1860f82 100644
--- a/sys/dev/usb/uark.c
+++ b/sys/dev/usb/uark.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uark.c,v 1.7 2007/06/10 14:49:00 mbalmer Exp $ */
+/* $OpenBSD: uark.c,v 1.8 2007/06/12 16:26:36 mbalmer Exp $ */
/*
* Copyright (c) 2006 Jonathan Gray <jsg@openbsd.org>
@@ -63,7 +63,7 @@ struct uark_softc {
struct device sc_dev;
usbd_device_handle sc_udev;
usbd_interface_handle sc_iface;
- device_ptr_t sc_subdev;
+ struct device * sc_subdev;
u_char sc_msr;
u_char sc_lsr;
@@ -203,7 +203,7 @@ uark_detach(struct device *self, int flags)
}
int
-uark_activate(device_ptr_t self, enum devact act)
+uark_activate(struct device *self, enum devact act)
{
struct uark_softc *sc = (struct uark_softc *)self;
int rv = 0;
diff --git a/sys/dev/usb/uaudio.c b/sys/dev/usb/uaudio.c
index 1b27098a9dd..8cc30ef0155 100644
--- a/sys/dev/usb/uaudio.c
+++ b/sys/dev/usb/uaudio.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uaudio.c,v 1.44 2007/06/10 14:49:00 mbalmer Exp $ */
+/* $OpenBSD: uaudio.c,v 1.45 2007/06/12 16:26:36 mbalmer Exp $ */
/* $NetBSD: uaudio.c,v 1.90 2004/10/29 17:12:53 kent Exp $ */
/*
@@ -177,7 +177,7 @@ struct uaudio_softc {
int sc_mode; /* play/record capability */
struct mixerctl *sc_ctls; /* mixer controls */
int sc_nctls; /* # of mixer controls */
- device_ptr_t sc_audiodev;
+ struct device * sc_audiodev;
char sc_dying;
};
@@ -467,7 +467,7 @@ uaudio_attach(struct device *parent, struct device *self, void *aux)
#define hw_encoding encoding
int
-uaudio_activate(device_ptr_t self, enum devact act)
+uaudio_activate(struct device *self, enum devact act)
{
struct uaudio_softc *sc = (struct uaudio_softc *)self;
int rv = 0;
@@ -485,7 +485,7 @@ uaudio_activate(device_ptr_t self, enum devact act)
}
int
-uaudio_detach(device_ptr_t self, int flags)
+uaudio_detach(struct device *self, int flags)
{
struct uaudio_softc *sc = (struct uaudio_softc *)self;
int rv = 0;
diff --git a/sys/dev/usb/uberry.c b/sys/dev/usb/uberry.c
index 568e32bd937..7bb40bed067 100644
--- a/sys/dev/usb/uberry.c
+++ b/sys/dev/usb/uberry.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uberry.c,v 1.8 2007/06/10 14:49:00 mbalmer Exp $ */
+/* $OpenBSD: uberry.c,v 1.9 2007/06/12 16:26:36 mbalmer Exp $ */
/*-
* Copyright (c) 2006 Theo de Raadt <deraadt@openbsd.org>
@@ -100,7 +100,7 @@ uberry_detach(struct device *self, int flags)
}
int
-uberry_activate(device_ptr_t self, enum devact act)
+uberry_activate(struct device *self, enum devact act)
{
switch (act) {
case DVACT_ACTIVATE:
diff --git a/sys/dev/usb/ubsa.c b/sys/dev/usb/ubsa.c
index 9700272b983..f94e8a63e5d 100644
--- a/sys/dev/usb/ubsa.c
+++ b/sys/dev/usb/ubsa.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ubsa.c,v 1.27 2007/06/10 14:49:00 mbalmer Exp $ */
+/* $OpenBSD: ubsa.c,v 1.28 2007/06/12 16:26:36 mbalmer Exp $ */
/* $NetBSD: ubsa.c,v 1.5 2002/11/25 00:51:33 fvdl Exp $ */
/*-
* Copyright (c) 2002, Alexander Kabaev <kan.FreeBSD.org>.
@@ -174,7 +174,7 @@ struct ubsa_softc {
u_char sc_lsr; /* Local status register */
u_char sc_msr; /* ubsa status register */
- device_ptr_t sc_subdev; /* ucom device */
+ struct device * sc_subdev; /* ucom device */
u_char sc_dying; /* disconnecting */
@@ -413,7 +413,7 @@ ubsa_detach(struct device *self, int flags)
}
int
-ubsa_activate(device_ptr_t self, enum devact act)
+ubsa_activate(struct device *self, enum devact act)
{
struct ubsa_softc *sc = (struct ubsa_softc *)self;
int rv = 0;
diff --git a/sys/dev/usb/ubt.c b/sys/dev/usb/ubt.c
index 2abf5e55846..0ccb824f35b 100644
--- a/sys/dev/usb/ubt.c
+++ b/sys/dev/usb/ubt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ubt.c,v 1.6 2007/06/10 14:49:00 mbalmer Exp $ */
+/* $OpenBSD: ubt.c,v 1.7 2007/06/12 16:26:36 mbalmer Exp $ */
/*-
* Copyright (c) 2006 Itronix Inc.
@@ -473,7 +473,7 @@ ubt_detach(struct device *self, int flags)
}
int
-ubt_activate(device_ptr_t self, enum devact act)
+ubt_activate(struct device *self, enum devact act)
{
struct ubt_softc *sc = (struct ubt_softc *)self;
int error = 0;
diff --git a/sys/dev/usb/ucom.c b/sys/dev/usb/ucom.c
index 931341e535f..0c08464b700 100644
--- a/sys/dev/usb/ucom.c
+++ b/sys/dev/usb/ucom.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ucom.c,v 1.39 2007/06/11 16:30:31 mbalmer Exp $ */
+/* $OpenBSD: ucom.c,v 1.40 2007/06/12 16:26:36 mbalmer Exp $ */
/* $NetBSD: ucom.c,v 1.49 2003/01/01 00:10:25 thorpej Exp $ */
/*
@@ -258,7 +258,7 @@ ucom_detach(struct device *self, int flags)
}
int
-ucom_activate(device_ptr_t self, enum devact act)
+ucom_activate(struct device *self, enum devact act)
{
struct ucom_softc *sc = (struct ucom_softc *)self;
diff --git a/sys/dev/usb/ucycom.c b/sys/dev/usb/ucycom.c
index 780ab86f542..2cfdbb86048 100644
--- a/sys/dev/usb/ucycom.c
+++ b/sys/dev/usb/ucycom.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ucycom.c,v 1.8 2007/06/10 10:53:48 mbalmer Exp $ */
+/* $OpenBSD: ucycom.c,v 1.9 2007/06/12 16:26:36 mbalmer Exp $ */
/* $NetBSD: ucycom.c,v 1.3 2005/08/05 07:27:47 skrll Exp $ */
/*
@@ -128,7 +128,7 @@ struct ucycom_softc {
uint8_t sc_newmsr; /* from HID intr */
int sc_swflags;
- device_ptr_t sc_subdev;
+ struct device * sc_subdev;
/* flags */
u_char sc_dying;
@@ -587,7 +587,7 @@ ucycom_detach(struct device *self, int flags)
}
int
-ucycom_activate(device_ptr_t self, enum devact act)
+ucycom_activate(struct device *self, enum devact act)
{
struct ucycom_softc *sc = (struct ucycom_softc *)self;
int rv = 0;
diff --git a/sys/dev/usb/udcf.c b/sys/dev/usb/udcf.c
index 7cccb53840d..ac64f76c907 100644
--- a/sys/dev/usb/udcf.c
+++ b/sys/dev/usb/udcf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: udcf.c,v 1.36 2007/06/10 14:49:00 mbalmer Exp $ */
+/* $OpenBSD: udcf.c,v 1.37 2007/06/12 16:26:36 mbalmer Exp $ */
/*
* Copyright (c) 2006 Marc Balmer <mbalmer@openbsd.org>
@@ -689,7 +689,7 @@ udcf_ct_probe(void *xsc)
}
int
-udcf_activate(device_ptr_t self, enum devact act)
+udcf_activate(struct device *self, enum devact act)
{
struct udcf_softc *sc = (struct udcf_softc *)self;
diff --git a/sys/dev/usb/udsbr.c b/sys/dev/usb/udsbr.c
index 9bf33edded4..87d4132bcd4 100644
--- a/sys/dev/usb/udsbr.c
+++ b/sys/dev/usb/udsbr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: udsbr.c,v 1.15 2007/06/10 14:49:01 mbalmer Exp $ */
+/* $OpenBSD: udsbr.c,v 1.16 2007/06/12 16:26:36 mbalmer Exp $ */
/* $NetBSD: udsbr.c,v 1.7 2002/07/11 21:14:27 augustss Exp $ */
/*
@@ -167,7 +167,7 @@ udsbr_detach(struct device *self, int flags)
}
int
-udsbr_activate(device_ptr_t self, enum devact act)
+udsbr_activate(struct device *self, enum devact act)
{
struct udsbr_softc *sc = (struct udsbr_softc *)self;
int rv = 0;
diff --git a/sys/dev/usb/ueagle.c b/sys/dev/usb/ueagle.c
index 87c7857670c..04802cea722 100644
--- a/sys/dev/usb/ueagle.c
+++ b/sys/dev/usb/ueagle.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ueagle.c,v 1.19 2007/06/10 14:49:01 mbalmer Exp $ */
+/* $OpenBSD: ueagle.c,v 1.20 2007/06/12 16:26:36 mbalmer Exp $ */
/*-
* Copyright (c) 2003-2006
@@ -1452,7 +1452,7 @@ ueagle_stop(struct ifnet *ifp, int disable)
}
int
-ueagle_activate(device_ptr_t self, enum devact act)
+ueagle_activate(struct device *self, enum devact act)
{
struct ueagle_softc *sc = (struct ueagle_softc *)self;
diff --git a/sys/dev/usb/uftdi.c b/sys/dev/usb/uftdi.c
index 2649731c975..f25d0674509 100644
--- a/sys/dev/usb/uftdi.c
+++ b/sys/dev/usb/uftdi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uftdi.c,v 1.38 2007/06/10 14:49:01 mbalmer Exp $ */
+/* $OpenBSD: uftdi.c,v 1.39 2007/06/12 16:26:36 mbalmer Exp $ */
/* $NetBSD: uftdi.c,v 1.14 2003/02/23 04:20:07 simonb Exp $ */
/*
@@ -95,7 +95,7 @@ struct uftdi_softc {
u_char sc_msr;
u_char sc_lsr;
- device_ptr_t sc_subdev;
+ struct device * sc_subdev;
u_char sc_dying;
@@ -380,7 +380,7 @@ bad:
}
int
-uftdi_activate(device_ptr_t self, enum devact act)
+uftdi_activate(struct device *self, enum devact act)
{
struct uftdi_softc *sc = (struct uftdi_softc *)self;
int rv = 0;
@@ -399,7 +399,7 @@ uftdi_activate(device_ptr_t self, enum devact act)
}
int
-uftdi_detach(device_ptr_t self, int flags)
+uftdi_detach(struct device *self, int flags)
{
struct uftdi_softc *sc = (struct uftdi_softc *)self;
diff --git a/sys/dev/usb/ugen.c b/sys/dev/usb/ugen.c
index 5143300072f..3daf002a728 100644
--- a/sys/dev/usb/ugen.c
+++ b/sys/dev/usb/ugen.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ugen.c,v 1.47 2007/06/11 16:30:31 mbalmer Exp $ */
+/* $OpenBSD: ugen.c,v 1.48 2007/06/12 16:26:36 mbalmer Exp $ */
/* $NetBSD: ugen.c,v 1.63 2002/11/26 18:49:48 christos Exp $ */
/* $FreeBSD: src/sys/dev/usb/ugen.c,v 1.26 1999/11/17 22:33:41 n_hibma Exp $ */
@@ -726,7 +726,7 @@ ugenwrite(dev_t dev, struct uio *uio, int flag)
}
int
-ugen_activate(device_ptr_t self, enum devact act)
+ugen_activate(struct device *self, enum devact act)
{
struct ugen_softc *sc = (struct ugen_softc *)self;
diff --git a/sys/dev/usb/uhci.c b/sys/dev/usb/uhci.c
index 4e933f32990..26ebe968c72 100644
--- a/sys/dev/usb/uhci.c
+++ b/sys/dev/usb/uhci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uhci.c,v 1.57 2007/06/10 14:49:01 mbalmer Exp $ */
+/* $OpenBSD: uhci.c,v 1.58 2007/06/12 16:26:36 mbalmer Exp $ */
/* $NetBSD: uhci.c,v 1.172 2003/02/23 04:19:26 simonb Exp $ */
/* $FreeBSD: src/sys/dev/usb/uhci.c,v 1.33 1999/11/17 22:33:41 n_hibma Exp $ */
@@ -508,7 +508,7 @@ uhci_init(uhci_softc_t *sc)
}
int
-uhci_activate(device_ptr_t self, enum devact act)
+uhci_activate(struct device *self, enum devact act)
{
struct uhci_softc *sc = (struct uhci_softc *)self;
int rv = 0;
diff --git a/sys/dev/usb/uhcivar.h b/sys/dev/usb/uhcivar.h
index 776b745b123..072883cd3d1 100644
--- a/sys/dev/usb/uhcivar.h
+++ b/sys/dev/usb/uhcivar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: uhcivar.h,v 1.17 2007/06/10 10:15:35 mbalmer Exp $ */
+/* $OpenBSD: uhcivar.h,v 1.18 2007/06/12 16:26:36 mbalmer Exp $ */
/* $NetBSD: uhcivar.h,v 1.36 2002/12/31 00:39:11 augustss Exp $ */
/* $FreeBSD: src/sys/dev/usb/uhcivar.h,v 1.14 1999/11/17 22:33:42 n_hibma Exp $ */
@@ -183,11 +183,11 @@ typedef struct uhci_softc {
void *sc_powerhook; /* cookie from power hook */
void *sc_shutdownhook; /* cookie from shutdown hook */
- device_ptr_t sc_child; /* /dev/usb# device */
+ struct device *sc_child; /* /dev/usb# device */
} uhci_softc_t;
usbd_status uhci_init(uhci_softc_t *);
usbd_status uhci_run(uhci_softc_t *, int run);
int uhci_intr(void *);
int uhci_detach(uhci_softc_t *, int);
-int uhci_activate(device_ptr_t, enum devact);
+int uhci_activate(struct device *, enum devact);
diff --git a/sys/dev/usb/uhid.c b/sys/dev/usb/uhid.c
index 12a811a1879..a6a27ce0132 100644
--- a/sys/dev/usb/uhid.c
+++ b/sys/dev/usb/uhid.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uhid.c,v 1.39 2007/06/11 16:30:31 mbalmer Exp $ */
+/* $OpenBSD: uhid.c,v 1.40 2007/06/12 16:26:36 mbalmer Exp $ */
/* $NetBSD: uhid.c,v 1.57 2003/03/11 16:44:00 augustss Exp $ */
/*
@@ -147,7 +147,7 @@ uhid_attach(struct device *parent, struct device *self, void *aux)
}
int
-uhid_activate(device_ptr_t self, enum devact act)
+uhid_activate(struct device *self, enum devact act)
{
struct uhid_softc *sc = (struct uhid_softc *)self;
diff --git a/sys/dev/usb/uhidev.c b/sys/dev/usb/uhidev.c
index e166759ca68..e410a843f31 100644
--- a/sys/dev/usb/uhidev.c
+++ b/sys/dev/usb/uhidev.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uhidev.c,v 1.25 2007/06/10 14:49:01 mbalmer Exp $ */
+/* $OpenBSD: uhidev.c,v 1.26 2007/06/12 16:26:36 mbalmer Exp $ */
/* $NetBSD: uhidev.c,v 1.14 2003/03/11 16:44:00 augustss Exp $ */
/*
@@ -243,13 +243,13 @@ uhidev_attach(struct device *parent, struct device *self, void *aux)
if (nrepid > 0)
printf("%s: %d report ids\n", sc->sc_dev.dv_xname, nrepid);
nrepid++;
- sc->sc_subdevs = malloc(nrepid * sizeof(device_ptr_t),
+ sc->sc_subdevs = malloc(nrepid * sizeof(struct device *),
M_USBDEV, M_NOWAIT);
if (sc->sc_subdevs == NULL) {
printf("%s: no memory\n", sc->sc_dev.dv_xname);
return;
}
- bzero(sc->sc_subdevs, nrepid * sizeof(device_ptr_t));
+ bzero(sc->sc_subdevs, nrepid * sizeof(struct device *));
sc->sc_nrepid = nrepid;
sc->sc_isize = 0;
@@ -340,7 +340,7 @@ int uhidevsubmatch(struct device *parent, void *match, void *aux)
}
int
-uhidev_activate(device_ptr_t self, enum devact act)
+uhidev_activate(struct device *self, enum devact act)
{
struct uhidev_softc *sc = (struct uhidev_softc *)self;
int i, rv = 0;
diff --git a/sys/dev/usb/uhub.c b/sys/dev/usb/uhub.c
index 686324438f5..2d460791d9e 100644
--- a/sys/dev/usb/uhub.c
+++ b/sys/dev/usb/uhub.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uhub.c,v 1.45 2007/06/10 14:49:01 mbalmer Exp $ */
+/* $OpenBSD: uhub.c,v 1.46 2007/06/12 16:26:36 mbalmer Exp $ */
/* $NetBSD: uhub.c,v 1.64 2003/02/08 03:32:51 ichiro Exp $ */
/* $FreeBSD: src/sys/dev/usb/uhub.c,v 1.18 1999/11/17 22:33:43 n_hibma Exp $ */
@@ -494,7 +494,7 @@ uhub_explore(usbd_device_handle dev)
}
int
-uhub_activate(device_ptr_t self, enum devact act)
+uhub_activate(struct device *self, enum devact act)
{
struct uhub_softc *sc = (struct uhub_softc *)self;
struct usbd_hub *hub = sc->sc_hub->hub;
diff --git a/sys/dev/usb/uipaq.c b/sys/dev/usb/uipaq.c
index 7128403d63d..44148cbb710 100644
--- a/sys/dev/usb/uipaq.c
+++ b/sys/dev/usb/uipaq.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uipaq.c,v 1.9 2007/06/10 14:49:01 mbalmer Exp $ */
+/* $OpenBSD: uipaq.c,v 1.10 2007/06/12 16:26:36 mbalmer Exp $ */
/*
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -85,7 +85,7 @@ struct uipaq_softc {
usbd_device_handle sc_udev; /* device */
usbd_interface_handle sc_iface; /* interface */
- device_ptr_t sc_subdev; /* ucom uses that */
+ struct device * sc_subdev; /* ucom uses that */
u_int16_t sc_lcr; /* state for DTR/RTS */
u_int16_t sc_flags;
@@ -353,7 +353,7 @@ uipaq_set(void *addr, int portno, int reg, int onoff)
int
-uipaq_activate(device_ptr_t self, enum devact act)
+uipaq_activate(struct device *self, enum devact act)
{
struct uipaq_softc *sc = (struct uipaq_softc *)self;
int rv = 0;
@@ -372,7 +372,7 @@ uipaq_activate(device_ptr_t self, enum devact act)
}
int
-uipaq_detach(device_ptr_t self, int flags)
+uipaq_detach(struct device *self, int flags)
{
struct uipaq_softc *sc = (struct uipaq_softc *)self;
int rv = 0;
diff --git a/sys/dev/usb/ukbd.c b/sys/dev/usb/ukbd.c
index 7294f117842..339fb1493ce 100644
--- a/sys/dev/usb/ukbd.c
+++ b/sys/dev/usb/ukbd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ukbd.c,v 1.34 2007/06/11 16:30:31 mbalmer Exp $ */
+/* $OpenBSD: ukbd.c,v 1.35 2007/06/12 16:26:36 mbalmer Exp $ */
/* $NetBSD: ukbd.c,v 1.85 2003/03/11 16:44:00 augustss Exp $ */
/*
@@ -475,7 +475,7 @@ ukbd_enable(void *v, int on)
}
int
-ukbd_activate(device_ptr_t self, enum devact act)
+ukbd_activate(struct device *self, enum devact act)
{
struct ukbd_softc *sc = (struct ukbd_softc *)self;
int rv = 0;
diff --git a/sys/dev/usb/ulpt.c b/sys/dev/usb/ulpt.c
index 18b00a8d4b1..4658c2e1eb1 100644
--- a/sys/dev/usb/ulpt.c
+++ b/sys/dev/usb/ulpt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ulpt.c,v 1.30 2007/06/11 16:30:31 mbalmer Exp $ */
+/* $OpenBSD: ulpt.c,v 1.31 2007/06/12 16:26:36 mbalmer Exp $ */
/* $NetBSD: ulpt.c,v 1.57 2003/01/05 10:19:42 scw Exp $ */
/* $FreeBSD: src/sys/dev/usb/ulpt.c,v 1.24 1999/11/17 22:33:44 n_hibma Exp $ */
@@ -298,7 +298,7 @@ ulpt_attach(struct device *parent, struct device *self, void *aux)
}
int
-ulpt_activate(device_ptr_t self, enum devact act)
+ulpt_activate(struct device *self, enum devact act)
{
struct ulpt_softc *sc = (struct ulpt_softc *)self;
diff --git a/sys/dev/usb/umassvar.h b/sys/dev/usb/umassvar.h
index e8513fdc735..f436f0dbb4a 100644
--- a/sys/dev/usb/umassvar.h
+++ b/sys/dev/usb/umassvar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: umassvar.h,v 1.10 2007/06/06 19:25:49 mk Exp $ */
+/* $OpenBSD: umassvar.h,v 1.11 2007/06/12 16:26:36 mbalmer Exp $ */
/* $NetBSD: umassvar.h,v 1.20 2003/09/08 19:31:01 mycroft Exp $ */
/*-
* Copyright (c) 1999 MAEKAWA Masahide <bishop@rr.iij4u.or.jp>,
@@ -146,7 +146,7 @@ struct umass_wire_methods {
};
struct umassbus_softc {
- device_ptr_t sc_child; /* child device, for detach */
+ struct device * sc_child; /* child device, for detach */
};
/* the per device structure */
diff --git a/sys/dev/usb/umct.c b/sys/dev/usb/umct.c
index 3e03b0af0ed..bed349693bd 100644
--- a/sys/dev/usb/umct.c
+++ b/sys/dev/usb/umct.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: umct.c,v 1.23 2007/06/10 14:49:01 mbalmer Exp $ */
+/* $OpenBSD: umct.c,v 1.24 2007/06/12 16:26:36 mbalmer Exp $ */
/* $NetBSD: umct.c,v 1.10 2003/02/23 04:20:07 simonb Exp $ */
/*
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -99,7 +99,7 @@ struct umct_softc {
u_char sc_status;
- device_ptr_t sc_subdev; /* ucom device */
+ struct device * sc_subdev; /* ucom device */
u_char sc_dying; /* disconnecting */
@@ -337,7 +337,7 @@ umct_detach(struct device *self, int flags)
}
int
-umct_activate(device_ptr_t self, enum devact act)
+umct_activate(struct device *self, enum devact act)
{
struct umct_softc *sc = (struct umct_softc *)self;
int rv = 0;
diff --git a/sys/dev/usb/umidi.c b/sys/dev/usb/umidi.c
index ffbf6424a06..b1b5004a102 100644
--- a/sys/dev/usb/umidi.c
+++ b/sys/dev/usb/umidi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: umidi.c,v 1.20 2007/06/10 14:49:01 mbalmer Exp $ */
+/* $OpenBSD: umidi.c,v 1.21 2007/06/12 16:26:36 mbalmer Exp $ */
/* $NetBSD: umidi.c,v 1.16 2002/07/11 21:14:32 augustss Exp $ */
/*
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -229,7 +229,7 @@ error:
}
int
-umidi_activate(device_ptr_t self, enum devact act)
+umidi_activate(struct device *self, enum devact act)
{
struct umidi_softc *sc = (struct umidi_softc *)self;
diff --git a/sys/dev/usb/umodem.c b/sys/dev/usb/umodem.c
index fdc836953af..a6584ab855e 100644
--- a/sys/dev/usb/umodem.c
+++ b/sys/dev/usb/umodem.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: umodem.c,v 1.30 2007/06/11 16:30:31 mbalmer Exp $ */
+/* $OpenBSD: umodem.c,v 1.31 2007/06/12 16:26:36 mbalmer Exp $ */
/* $NetBSD: umodem.c,v 1.45 2002/09/23 05:51:23 simonb Exp $ */
/*
@@ -110,7 +110,7 @@ struct umodem_softc {
u_char sc_dtr; /* current DTR state */
u_char sc_rts; /* current RTS state */
- device_ptr_t sc_subdev; /* ucom device */
+ struct device * sc_subdev; /* ucom device */
u_char sc_opening; /* lock during open */
u_char sc_dying; /* disconnecting */
@@ -713,7 +713,7 @@ umodem_set_comm_feature(struct umodem_softc *sc, int feature, int state)
}
int
-umodem_activate(device_ptr_t self, enum devact act)
+umodem_activate(struct device *self, enum devact act)
{
struct umodem_softc *sc = (struct umodem_softc *)self;
int rv = 0;
diff --git a/sys/dev/usb/ums.c b/sys/dev/usb/ums.c
index 21c8b13ad8f..d5a33560c5b 100644
--- a/sys/dev/usb/ums.c
+++ b/sys/dev/usb/ums.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ums.c,v 1.23 2007/06/11 16:30:31 mbalmer Exp $ */
+/* $OpenBSD: ums.c,v 1.24 2007/06/12 16:26:36 mbalmer Exp $ */
/* $NetBSD: ums.c,v 1.60 2003/03/11 16:44:00 augustss Exp $ */
/*
@@ -267,7 +267,7 @@ ums_attach(struct device *parent, struct device *self, void *aux)
}
int
-ums_activate(device_ptr_t self, enum devact act)
+ums_activate(struct device *self, enum devact act)
{
struct ums_softc *sc = (struct ums_softc *)self;
int rv = 0;
diff --git a/sys/dev/usb/umsm.c b/sys/dev/usb/umsm.c
index 0e32e5ca2f6..a8e8387dc4a 100644
--- a/sys/dev/usb/umsm.c
+++ b/sys/dev/usb/umsm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: umsm.c,v 1.12 2007/06/10 14:49:01 mbalmer Exp $ */
+/* $OpenBSD: umsm.c,v 1.13 2007/06/12 16:26:37 mbalmer Exp $ */
/*
* Copyright (c) 2006 Jonathan Gray <jsg@openbsd.org>
@@ -39,7 +39,7 @@ struct umsm_softc {
struct device sc_dev;
usbd_device_handle sc_udev;
usbd_interface_handle sc_iface;
- device_ptr_t sc_subdev;
+ struct device * sc_subdev;
u_char sc_dying;
};
@@ -186,7 +186,7 @@ umsm_detach(struct device *self, int flags)
}
int
-umsm_activate(device_ptr_t self, enum devact act)
+umsm_activate(struct device *self, enum devact act)
{
struct umsm_softc *sc = (struct umsm_softc *)self;
int rv = 0;
diff --git a/sys/dev/usb/uow.c b/sys/dev/usb/uow.c
index f2a483c943e..46d5d829a7e 100644
--- a/sys/dev/usb/uow.c
+++ b/sys/dev/usb/uow.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uow.c,v 1.20 2007/06/11 01:05:43 jsg Exp $ */
+/* $OpenBSD: uow.c,v 1.21 2007/06/12 16:26:37 mbalmer Exp $ */
/*
* Copyright (c) 2006 Alexander Yurchenko <grange@openbsd.org>
@@ -263,7 +263,7 @@ uow_detach(struct device *self, int flags)
}
int
-uow_activate(device_ptr_t self, enum devact act)
+uow_activate(struct device *self, enum devact act)
{
struct uow_softc *sc = (struct uow_softc *)self;
int rv = 0;
diff --git a/sys/dev/usb/uplcom.c b/sys/dev/usb/uplcom.c
index 6bb367cd666..3b400a4ab52 100644
--- a/sys/dev/usb/uplcom.c
+++ b/sys/dev/usb/uplcom.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uplcom.c,v 1.40 2007/06/11 16:30:31 mbalmer Exp $ */
+/* $OpenBSD: uplcom.c,v 1.41 2007/06/12 16:26:37 mbalmer Exp $ */
/* $NetBSD: uplcom.c,v 1.29 2002/09/23 05:51:23 simonb Exp $ */
/*
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -104,7 +104,7 @@ struct uplcom_softc {
int sc_dtr; /* current DTR state */
int sc_rts; /* current RTS state */
- device_ptr_t sc_subdev; /* ucom device */
+ struct device * sc_subdev; /* ucom device */
u_char sc_dying; /* disconnecting */
@@ -430,7 +430,7 @@ uplcom_detach(struct device *self, int flags)
}
int
-uplcom_activate(device_ptr_t self, enum devact act)
+uplcom_activate(struct device *self, enum devact act)
{
struct uplcom_softc *sc = (struct uplcom_softc *)self;
int rv = 0;
diff --git a/sys/dev/usb/urio.c b/sys/dev/usb/urio.c
index 32e6460d5fa..c5d92957d16 100644
--- a/sys/dev/usb/urio.c
+++ b/sys/dev/usb/urio.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: urio.c,v 1.30 2007/06/11 16:30:31 mbalmer Exp $ */
+/* $OpenBSD: urio.c,v 1.31 2007/06/12 16:26:37 mbalmer Exp $ */
/* $NetBSD: urio.c,v 1.15 2002/10/23 09:14:02 jdolecek Exp $ */
/*
@@ -231,7 +231,7 @@ urio_detach(struct device *self, int flags)
}
int
-urio_activate(device_ptr_t self, enum devact act)
+urio_activate(struct device *self, enum devact act)
{
struct urio_softc *sc = (struct urio_softc *)self;
diff --git a/sys/dev/usb/usb.c b/sys/dev/usb/usb.c
index 720297f1ce0..43006864b9d 100644
--- a/sys/dev/usb/usb.c
+++ b/sys/dev/usb/usb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: usb.c,v 1.52 2007/06/11 16:30:31 mbalmer Exp $ */
+/* $OpenBSD: usb.c,v 1.53 2007/06/12 16:26:37 mbalmer Exp $ */
/* $NetBSD: usb.c,v 1.77 2003/01/01 00:10:26 thorpej Exp $ */
/*
@@ -720,7 +720,7 @@ usbd_add_dev_event(int type, usbd_device_handle udev)
}
void
-usbd_add_drv_event(int type, usbd_device_handle udev, device_ptr_t dev)
+usbd_add_drv_event(int type, usbd_device_handle udev, struct device *dev)
{
struct usb_event ue;
@@ -783,7 +783,7 @@ usb_schedsoftintr(usbd_bus_handle bus)
}
int
-usb_activate(device_ptr_t self, enum devact act)
+usb_activate(struct device *self, enum devact act)
{
struct usb_softc *sc = (struct usb_softc *)self;
usbd_device_handle dev = sc->sc_port.device;
@@ -806,7 +806,7 @@ usb_activate(device_ptr_t self, enum devact act)
}
int
-usb_detach(device_ptr_t self, int flags)
+usb_detach(struct device *self, int flags)
{
struct usb_softc *sc = (struct usb_softc *)self;
struct usb_event ue;
diff --git a/sys/dev/usb/usb_port.h b/sys/dev/usb/usb_port.h
index ce787d2b1ec..74a0af45046 100644
--- a/sys/dev/usb/usb_port.h
+++ b/sys/dev/usb/usb_port.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: usb_port.h,v 1.85 2007/06/11 16:30:31 mbalmer Exp $ */
+/* $OpenBSD: usb_port.h,v 1.86 2007/06/12 16:26:37 mbalmer Exp $ */
/* $NetBSD: usb_port.h,v 1.62 2003/02/15 18:33:30 augustss Exp $ */
/* $FreeBSD: src/sys/dev/usb/usb_port.h,v 1.21 1999/11/17 22:33:47 n_hibma Exp $ */
@@ -78,8 +78,6 @@
#define slinear16_to_ulinear8_le linear16_to_ulinear8_le
#define slinear16_to_ulinear8_be linear16_to_ulinear8_be
-typedef struct device *device_ptr_t;
-
#define DECLARE_USB_DMA_T \
struct usb_dma_block; \
typedef struct { \
diff --git a/sys/dev/usb/usb_subr.c b/sys/dev/usb/usb_subr.c
index 783a64639bc..6bdf55fb606 100644
--- a/sys/dev/usb/usb_subr.c
+++ b/sys/dev/usb/usb_subr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: usb_subr.c,v 1.55 2007/06/11 06:14:24 mbalmer Exp $ */
+/* $OpenBSD: usb_subr.c,v 1.56 2007/06/12 16:26:37 mbalmer Exp $ */
/* $NetBSD: usb_subr.c,v 1.103 2003/01/10 11:19:13 augustss Exp $ */
/* $FreeBSD: src/sys/dev/usb/usb_subr.c,v 1.18 1999/11/17 22:33:47 n_hibma Exp $ */
@@ -73,10 +73,10 @@ void usbd_devinfo_vp(usbd_device_handle, char *, char *,
char *usbd_get_string(usbd_device_handle, int, char *);
int usbd_getnewaddr(usbd_bus_handle);
int usbd_print(void *, const char *);
-int usbd_submatch(device_ptr_t, void *, void *);
+int usbd_submatch(struct device *, void *, void *);
void usbd_free_iface_data(usbd_device_handle, int);
void usbd_kill_pipe(usbd_pipe_handle);
-usbd_status usbd_probe_and_attach(device_ptr_t,
+usbd_status usbd_probe_and_attach(struct device *,
usbd_device_handle, int, int);
u_int32_t usb_cookie_no = 0;
@@ -821,14 +821,14 @@ usbd_getnewaddr(usbd_bus_handle bus)
usbd_status
-usbd_probe_and_attach(device_ptr_t parent, usbd_device_handle dev, int port,
+usbd_probe_and_attach(struct device *parent, usbd_device_handle dev, int port,
int addr)
{
struct usb_attach_arg uaa;
usb_device_descriptor_t *dd = &dev->ddesc;
int found, i, confi, nifaces, len;
usbd_status err;
- device_ptr_t dv;
+ struct device *dv;
usbd_interface_handle *ifaces;
uaa.device = dev;
@@ -954,7 +954,7 @@ usbd_probe_and_attach(device_ptr_t parent, usbd_device_handle dev, int port,
* and attach a driver.
*/
usbd_status
-usbd_new_device(device_ptr_t parent, usbd_bus_handle bus, int depth,
+usbd_new_device(struct device *parent, usbd_bus_handle bus, int depth,
int speed, int port, struct usbd_port *up)
{
usbd_device_handle dev, adev;
@@ -1335,7 +1335,7 @@ usb_free_device(usbd_device_handle dev)
* been disconnected.
*/
void
-usb_disconnect_port(struct usbd_port *up, device_ptr_t parent)
+usb_disconnect_port(struct usbd_port *up, struct device *parent)
{
usbd_device_handle dev = up->device;
char *hubname = parent->dv_xname;
diff --git a/sys/dev/usb/usbdi.h b/sys/dev/usb/usbdi.h
index 2159b2b9d7d..e2fdc47e53b 100644
--- a/sys/dev/usb/usbdi.h
+++ b/sys/dev/usb/usbdi.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: usbdi.h,v 1.26 2007/05/29 01:43:44 claudio Exp $ */
+/* $OpenBSD: usbdi.h,v 1.27 2007/06/12 16:26:37 mbalmer Exp $ */
/* $NetBSD: usbdi.h,v 1.62 2002/07/11 21:14:35 augustss Exp $ */
/* $FreeBSD: src/sys/dev/usb/usbdi.h,v 1.18 1999/11/17 22:33:49 n_hibma Exp $ */
@@ -165,7 +165,7 @@ void usbd_set_polling(usbd_device_handle iface, int on);
const char *usbd_errstr(usbd_status err);
void usbd_add_dev_event(int, usbd_device_handle);
-void usbd_add_drv_event(int, usbd_device_handle, device_ptr_t);
+void usbd_add_drv_event(int, usbd_device_handle, struct device *);
char *usbd_devinfo_alloc(usbd_device_handle dev, int showclass);
void usbd_devinfo_free(char *devinfop);
diff --git a/sys/dev/usb/usbdi_util.c b/sys/dev/usb/usbdi_util.c
index 6e578f65916..e84f447e1de 100644
--- a/sys/dev/usb/usbdi_util.c
+++ b/sys/dev/usb/usbdi_util.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: usbdi_util.c,v 1.22 2007/06/10 17:46:27 mbalmer Exp $ */
+/* $OpenBSD: usbdi_util.c,v 1.23 2007/06/12 16:26:37 mbalmer Exp $ */
/* $NetBSD: usbdi_util.c,v 1.40 2002/07/11 21:14:36 augustss Exp $ */
/* $FreeBSD: src/sys/dev/usb/usbdi_util.c,v 1.14 1999/11/17 22:33:50 n_hibma Exp $ */
@@ -504,7 +504,7 @@ usbd_intr_transfer(usbd_xfer_handle xfer, usbd_pipe_handle pipe,
}
void
-usb_detach_wait(device_ptr_t dv)
+usb_detach_wait(struct device *dv)
{
DPRINTF(("usb_detach_wait: waiting for %s\n", dv->dv_xname));
if (tsleep(dv, PZERO, "usbdet", hz * 60))
@@ -514,7 +514,7 @@ usb_detach_wait(device_ptr_t dv)
}
void
-usb_detach_wakeup(device_ptr_t dv)
+usb_detach_wakeup(struct device *dv)
{
DPRINTF(("usb_detach_wakeup: for %s\n", dv->dv_xname));
wakeup(dv);
diff --git a/sys/dev/usb/usbdi_util.h b/sys/dev/usb/usbdi_util.h
index c5d5af8ea6e..87deed525b3 100644
--- a/sys/dev/usb/usbdi_util.h
+++ b/sys/dev/usb/usbdi_util.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: usbdi_util.h,v 1.15 2007/06/09 12:03:39 mbalmer Exp $ */
+/* $OpenBSD: usbdi_util.h,v 1.16 2007/06/12 16:26:37 mbalmer Exp $ */
/* $NetBSD: usbdi_util.h,v 1.28 2002/07/11 21:14:36 augustss Exp $ */
/* $FreeBSD: src/sys/dev/usb/usbdi_util.h,v 1.9 1999/11/17 22:33:50 n_hibma Exp $ */
@@ -87,7 +87,7 @@ usbd_status usbd_intr_transfer(usbd_xfer_handle xfer,
usbd_pipe_handle pipe, u_int16_t flags, u_int32_t timeout,
void *buf, u_int32_t *size, char *lbl);
-void usb_detach_wait(device_ptr_t);
-void usb_detach_wakeup(device_ptr_t);
+void usb_detach_wait(struct device *);
+void usb_detach_wakeup(struct device *);
usb_descriptor_t *usb_find_desc(usbd_device_handle dev, int type);
diff --git a/sys/dev/usb/usbdivar.h b/sys/dev/usb/usbdivar.h
index ff128f88920..45c538e26d9 100644
--- a/sys/dev/usb/usbdivar.h
+++ b/sys/dev/usb/usbdivar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: usbdivar.h,v 1.28 2007/06/10 10:15:35 mbalmer Exp $ */
+/* $OpenBSD: usbdivar.h,v 1.29 2007/06/12 16:26:37 mbalmer Exp $ */
/* $NetBSD: usbdivar.h,v 1.70 2002/07/11 21:14:36 augustss Exp $ */
/* $FreeBSD: src/sys/dev/usb/usbdivar.h,v 1.11 1999/11/17 22:33:51 n_hibma Exp $ */
@@ -152,7 +152,7 @@ struct usbd_device {
usb_config_descriptor_t *cdesc; /* full config descr */
const struct usbd_quirks *quirks; /* device quirks, always set */
struct usbd_hub *hub; /* only if this is a hub */
- device_ptr_t *subdevs; /* sub-devices, 0 terminated */
+ struct device * *subdevs; /* sub-devices, 0 terminated */
};
struct usbd_interface {
@@ -244,7 +244,7 @@ usbd_status usbd_setup_pipe(usbd_device_handle dev,
usbd_interface_handle iface,
struct usbd_endpoint *, int,
usbd_pipe_handle *pipe);
-usbd_status usbd_new_device(device_ptr_t parent,
+usbd_status usbd_new_device(struct device *parent,
usbd_bus_handle bus, int depth,
int lowspeed, int port,
struct usbd_port *);
@@ -255,7 +255,7 @@ void usb_free_device(usbd_device_handle);
usbd_status usb_insert_transfer(usbd_xfer_handle xfer);
void usb_transfer_complete(usbd_xfer_handle xfer);
-void usb_disconnect_port(struct usbd_port *up, device_ptr_t);
+void usb_disconnect_port(struct usbd_port *up, struct device *);
/* Routines from usb.c */
void usb_needs_explore(usbd_device_handle);
diff --git a/sys/dev/usb/usbf_subr.c b/sys/dev/usb/usbf_subr.c
index 0e2ca2dd776..89cf045ac9e 100644
--- a/sys/dev/usb/usbf_subr.c
+++ b/sys/dev/usb/usbf_subr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: usbf_subr.c,v 1.6 2007/06/11 06:14:24 mbalmer Exp $ */
+/* $OpenBSD: usbf_subr.c,v 1.7 2007/06/12 16:26:37 mbalmer Exp $ */
/*
* Copyright (c) 2006 Uwe Stuehler <uwe@openbsd.org>
@@ -95,10 +95,10 @@ usbf_realloc(void **pp, size_t *sizep, size_t newsize)
* Attach a function driver.
*/
static usbf_status
-usbf_probe_and_attach(device_ptr_t parent, usbf_device_handle dev, int port)
+usbf_probe_and_attach(struct device *parent, usbf_device_handle dev, int port)
{
struct usbf_attach_arg uaa;
- device_ptr_t dv;
+ struct device *dv;
KASSERT(dev->function == NULL);
@@ -131,7 +131,7 @@ usbf_remove_device(usbf_device_handle dev, struct usbf_port *up)
KASSERT(dev != NULL && dev == up->device);
if (dev->function != NULL)
- config_detach((device_ptr_t)dev->function, DETACH_FORCE);
+ config_detach((struct device *)dev->function, DETACH_FORCE);
if (dev->default_pipe != NULL)
usbf_close_pipe(dev->default_pipe);
up->device = NULL;
@@ -139,7 +139,7 @@ usbf_remove_device(usbf_device_handle dev, struct usbf_port *up)
}
usbf_status
-usbf_new_device(device_ptr_t parent, usbf_bus_handle bus, int depth,
+usbf_new_device(struct device *parent, usbf_bus_handle bus, int depth,
int speed, int port, struct usbf_port *up)
{
struct usbf_device *dev;
@@ -882,7 +882,7 @@ usbf_free_buffer(usbf_xfer_handle xfer)
static void
usbf_dump_buffer(usbf_xfer_handle xfer)
{
- device_ptr_t dev = (device_ptr_t)xfer->pipe->device->bus->usbfctl;
+ struct device *dev = (struct device *)xfer->pipe->device->bus->usbfctl;
usbf_endpoint_handle ep = xfer->pipe->endpoint;
int index = usbf_endpoint_index(ep);
int dir = usbf_endpoint_dir(ep);
diff --git a/sys/dev/usb/usbfvar.h b/sys/dev/usb/usbfvar.h
index 74d4e41cc92..79d5d1521aa 100644
--- a/sys/dev/usb/usbfvar.h
+++ b/sys/dev/usb/usbfvar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: usbfvar.h,v 1.3 2007/06/10 10:15:35 mbalmer Exp $ */
+/* $OpenBSD: usbfvar.h,v 1.4 2007/06/12 16:26:37 mbalmer Exp $ */
/*
* Copyright (c) 2006 Uwe Stuehler <uwe@openbsd.org>
@@ -161,7 +161,7 @@ void usbf_do_request(usbf_xfer_handle, usbf_private_handle,
usbf_status);
/* usbf_subr.c */
-usbf_status usbf_new_device(device_ptr_t, usbf_bus_handle, int,
+usbf_status usbf_new_device(struct device *, usbf_bus_handle, int,
int, int, struct usbf_port *);
usbf_status usbf_set_endpoint_feature(usbf_config_handle, u_int8_t,
u_int16_t);
diff --git a/sys/dev/usb/uscanner.c b/sys/dev/usb/uscanner.c
index 4139beeb12a..70d68d33362 100644
--- a/sys/dev/usb/uscanner.c
+++ b/sys/dev/usb/uscanner.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uscanner.c,v 1.33 2007/06/11 16:30:31 mbalmer Exp $ */
+/* $OpenBSD: uscanner.c,v 1.34 2007/06/12 16:26:37 mbalmer Exp $ */
/* $NetBSD: uscanner.c,v 1.40 2003/01/27 00:32:44 wiz Exp $ */
/*
@@ -554,7 +554,7 @@ uscannerwrite(dev_t dev, struct uio *uio, int flag)
}
int
-uscanner_activate(device_ptr_t self, enum devact act)
+uscanner_activate(struct device *self, enum devact act)
{
struct uscanner_softc *sc = (struct uscanner_softc *)self;
diff --git a/sys/dev/usb/uslcom.c b/sys/dev/usb/uslcom.c
index 41d24c5dcb7..71a500282f8 100644
--- a/sys/dev/usb/uslcom.c
+++ b/sys/dev/usb/uslcom.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uslcom.c,v 1.10 2007/06/10 14:49:01 mbalmer Exp $ */
+/* $OpenBSD: uslcom.c,v 1.11 2007/06/12 16:26:37 mbalmer Exp $ */
/*
* Copyright (c) 2006 Jonathan Gray <jsg@openbsd.org>
@@ -83,7 +83,7 @@ struct uslcom_softc {
struct device sc_dev;
usbd_device_handle sc_udev;
usbd_interface_handle sc_iface;
- device_ptr_t sc_subdev;
+ struct device * sc_subdev;
u_char sc_msr;
u_char sc_lsr;
@@ -239,7 +239,7 @@ uslcom_detach(struct device *self, int flags)
}
int
-uslcom_activate(device_ptr_t self, enum devact act)
+uslcom_activate(struct device *self, enum devact act)
{
struct uslcom_softc *sc = (struct uslcom_softc *)self;
int rv = 0;
diff --git a/sys/dev/usb/usscanner.c b/sys/dev/usb/usscanner.c
index 434879b5c75..b7a21fb9617 100644
--- a/sys/dev/usb/usscanner.c
+++ b/sys/dev/usb/usscanner.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: usscanner.c,v 1.19 2007/06/10 14:49:01 mbalmer Exp $ */
+/* $OpenBSD: usscanner.c,v 1.20 2007/06/12 16:26:37 mbalmer Exp $ */
/* $NetBSD: usscanner.c,v 1.6 2001/01/23 14:04:14 augustss Exp $ */
/*
@@ -147,7 +147,7 @@ struct usscanner_softc {
struct scsipi_xfer *sc_xs;
- device_ptr_t sc_child; /* child device, for detach */
+ struct device * sc_child; /* child device, for detach */
struct scsipi_link sc_link;
struct scsi_adapter sc_atapi_adapter;
@@ -415,7 +415,7 @@ usscanner_cleanup(struct usscanner_softc *sc)
}
int
-usscanner_activate(device_ptr_t self, enum devact act)
+usscanner_activate(struct device *self, enum devact act)
{
struct usscanner_softc *sc = (struct usscanner_softc *)self;
diff --git a/sys/dev/usb/uts.c b/sys/dev/usb/uts.c
index c4846692677..66eeacfd762 100644
--- a/sys/dev/usb/uts.c
+++ b/sys/dev/usb/uts.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uts.c,v 1.14 2007/06/11 01:05:43 jsg Exp $ */
+/* $OpenBSD: uts.c,v 1.15 2007/06/12 16:26:37 mbalmer Exp $ */
/*
* Copyright (c) 2007 Robert Nagy <robert@openbsd.org>
@@ -74,7 +74,7 @@ struct uts_softc {
int sc_isize;
u_int8_t sc_pkts;
- device_ptr_t sc_wsmousedev;
+ struct device * sc_wsmousedev;
int sc_enabled;
int sc_buttons;
@@ -242,7 +242,7 @@ uts_detach(struct device *self, int flags)
}
int
-uts_activate(device_ptr_t self, enum devact act)
+uts_activate(struct device *self, enum devact act)
{
struct uts_softc *sc = (struct uts_softc *)self;
int rv = 0;
diff --git a/sys/dev/usb/uvisor.c b/sys/dev/usb/uvisor.c
index d7b9666fc9c..27ef63d89eb 100644
--- a/sys/dev/usb/uvisor.c
+++ b/sys/dev/usb/uvisor.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvisor.c,v 1.32 2007/06/10 14:49:01 mbalmer Exp $ */
+/* $OpenBSD: uvisor.c,v 1.33 2007/06/12 16:26:37 mbalmer Exp $ */
/* $NetBSD: uvisor.c,v 1.21 2003/08/03 21:59:26 nathanw Exp $ */
/*
@@ -141,7 +141,7 @@ struct uvisor_softc {
*/
int sc_vendor; /* USB device vendor */
- device_ptr_t sc_subdevs[UVISOR_MAX_CONN];
+ struct device * sc_subdevs[UVISOR_MAX_CONN];
int sc_numcon;
u_int16_t sc_flags;
@@ -376,7 +376,7 @@ bad:
}
int
-uvisor_activate(device_ptr_t self, enum devact act)
+uvisor_activate(struct device *self, enum devact act)
{
struct uvisor_softc *sc = (struct uvisor_softc *)self;
int rv = 0;
@@ -397,7 +397,7 @@ uvisor_activate(device_ptr_t self, enum devact act)
}
int
-uvisor_detach(device_ptr_t self, int flags)
+uvisor_detach(struct device *self, int flags)
{
struct uvisor_softc *sc = (struct uvisor_softc *)self;
int rv = 0;
diff --git a/sys/dev/usb/uvscom.c b/sys/dev/usb/uvscom.c
index 4c11affacad..b7507827bcc 100644
--- a/sys/dev/usb/uvscom.c
+++ b/sys/dev/usb/uvscom.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvscom.c,v 1.15 2007/06/10 14:49:01 mbalmer Exp $ */
+/* $OpenBSD: uvscom.c,v 1.16 2007/06/12 16:26:37 mbalmer Exp $ */
/* $NetBSD: uvscom.c,v 1.9 2003/02/12 15:36:20 ichiro Exp $ */
/*-
* Copyright (c) 2001-2002, Shunsuke Akiyama <akiyama@jp.FreeBSD.org>.
@@ -151,7 +151,7 @@ struct uvscom_softc {
uint16_t sc_lcr; /* Line control */
u_char sc_usr; /* unit status */
- device_ptr_t sc_subdev; /* ucom device */
+ struct device * sc_subdev; /* ucom device */
u_char sc_dying; /* disconnecting */
};
@@ -388,7 +388,7 @@ uvscom_detach(struct device *self, int flags)
}
int
-uvscom_activate(device_ptr_t self, enum devact act)
+uvscom_activate(struct device *self, enum devact act)
{
struct uvscom_softc *sc = (struct uvscom_softc *)self;
int rv = 0;
diff --git a/sys/dev/usb/uyap.c b/sys/dev/usb/uyap.c
index dc996308c7f..44cf08fe516 100644
--- a/sys/dev/usb/uyap.c
+++ b/sys/dev/usb/uyap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uyap.c,v 1.12 2007/06/10 14:49:01 mbalmer Exp $ */
+/* $OpenBSD: uyap.c,v 1.13 2007/06/12 16:26:37 mbalmer Exp $ */
/* $NetBSD: uyap.c,v 1.6 2002/07/11 21:14:37 augustss Exp $ */
/*
@@ -120,7 +120,7 @@ uyap_detach(struct device *self, int flags)
}
int
-uyap_activate(device_ptr_t self, enum devact act)
+uyap_activate(struct device *self, enum devact act)
{
return 0;
}