summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorMarc Balmer <mbalmer@cvs.openbsd.org>2007-06-11 05:42:55 +0000
committerMarc Balmer <mbalmer@cvs.openbsd.org>2007-06-11 05:42:55 +0000
commitf5cca0afd25a004ac93807a02a2dc9611c8724fa (patch)
tree650b8e3837cfe7d8bed5e1c62c361119c331c488 /sys/dev
parent016fcdcb5e952ecbad9e2631f4b1413ab263f3e1 (diff)
Remove the definition and usage of the USBGETSOFTC macro, which was really
only a cast to (void *). ok jsg.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/usb/if_aue.c8
-rw-r--r--sys/dev/usb/if_axe.c8
-rw-r--r--sys/dev/usb/if_udav.c8
-rw-r--r--sys/dev/usb/if_url.c12
-rw-r--r--sys/dev/usb/usb_port.h3
5 files changed, 19 insertions, 20 deletions
diff --git a/sys/dev/usb/if_aue.c b/sys/dev/usb/if_aue.c
index 3787a7c5e94..5f7cc989d96 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.61 2007/06/10 14:49:00 mbalmer Exp $ */
+/* $OpenBSD: if_aue.c,v 1.62 2007/06/11 05:42:53 mbalmer Exp $ */
/* $NetBSD: if_aue.c,v 1.82 2003/03/05 17:37:36 shiba Exp $ */
/*
* Copyright (c) 1997, 1998, 1999, 2000
@@ -428,7 +428,7 @@ aue_unlock_mii(struct aue_softc *sc)
int
aue_miibus_readreg(device_ptr_t dev, int phy, int reg)
{
- struct aue_softc *sc = USBGETSOFTC(dev);
+ struct aue_softc *sc = (void *)dev;
int i;
u_int16_t val;
@@ -482,7 +482,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)
{
- struct aue_softc *sc = USBGETSOFTC(dev);
+ struct aue_softc *sc = (void *)dev;
int i;
#if 0
@@ -516,7 +516,7 @@ aue_miibus_writereg(device_ptr_t dev, int phy, int reg, int data)
void
aue_miibus_statchg(device_ptr_t dev)
{
- struct aue_softc *sc = USBGETSOFTC(dev);
+ struct aue_softc *sc = (void *)dev;
struct mii_data *mii = GET_MII(sc);
DPRINTFN(5,("%s: %s: enter\n", sc->aue_dev.dv_xname, __func__));
diff --git a/sys/dev/usb/if_axe.c b/sys/dev/usb/if_axe.c
index e87c2ecef6b..800ca4ee07f 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.74 2007/06/10 14:49:00 mbalmer Exp $ */
+/* $OpenBSD: if_axe.c,v 1.75 2007/06/11 05:42:53 mbalmer Exp $ */
/*
* Copyright (c) 2005, 2006, 2007 Jonathan Gray <jsg@openbsd.org>
@@ -248,7 +248,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)
{
- struct axe_softc *sc = USBGETSOFTC(dev);
+ struct axe_softc *sc = (void *)dev;
usbd_status err;
uWord val;
@@ -296,7 +296,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)
{
- struct axe_softc *sc = USBGETSOFTC(dev);
+ struct axe_softc *sc = (void *)dev;
usbd_status err;
uWord uval;
@@ -320,7 +320,7 @@ axe_miibus_writereg(device_ptr_t dev, int phy, int reg, int val)
void
axe_miibus_statchg(device_ptr_t dev)
{
- struct axe_softc *sc = USBGETSOFTC(dev);
+ struct axe_softc *sc = (void *)dev;
struct mii_data *mii = GET_MII(sc);
int val, err;
diff --git a/sys/dev/usb/if_udav.c b/sys/dev/usb/if_udav.c
index 1d9e91ab40d..1c4b30b453a 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.30 2007/06/10 14:49:00 mbalmer Exp $ */
+/* $OpenBSD: if_udav.c,v 1.31 2007/06/11 05:42:53 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 $ */
/*
@@ -1524,7 +1524,7 @@ udav_miibus_readreg(device_ptr_t dev, int phy, int reg)
if (dev == NULL)
return (0);
- sc = USBGETSOFTC(dev);
+ sc = (void *)dev;
DPRINTFN(0xff, ("%s: %s: enter, phy=%d reg=0x%04x\n",
sc->sc_dev.dv_xname, __func__, phy, reg));
@@ -1580,7 +1580,7 @@ udav_miibus_writereg(device_ptr_t dev, int phy, int reg, int data)
if (dev == NULL)
return;
- sc = USBGETSOFTC(dev);
+ sc = (void *)dev;
DPRINTFN(0xff, ("%s: %s: enter, phy=%d reg=0x%04x data=0x%04x\n",
sc->sc_dev.dv_xname, __func__, phy, reg, data));
@@ -1633,7 +1633,7 @@ udav_miibus_statchg(device_ptr_t dev)
if (dev == NULL)
return;
- sc = USBGETSOFTC(dev);
+ sc = (void *)dev;
DPRINTF(("%s: %s: enter\n", sc->sc_dev.dv_xname, __func__));
#endif
/* Nothing to do */
diff --git a/sys/dev/usb/if_url.c b/sys/dev/usb/if_url.c
index dcacb0d147a..95a45075f4a 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.44 2007/06/10 14:49:00 mbalmer Exp $ */
+/* $OpenBSD: if_url.c,v 1.45 2007/06/11 05:42:54 mbalmer Exp $ */
/* $NetBSD: if_url.c,v 1.6 2002/09/29 10:19:21 martin Exp $ */
/*
* Copyright (c) 2001, 2002
@@ -1411,7 +1411,7 @@ url_int_miibus_readreg(device_ptr_t dev, int phy, int reg)
if (dev == NULL)
return (0);
- sc = USBGETSOFTC(dev);
+ sc = (void *)dev;
DPRINTFN(0xff, ("%s: %s: enter, phy=%d reg=0x%04x\n",
sc->sc_dev.dv_xname, __func__, phy, reg));
@@ -1483,7 +1483,7 @@ url_int_miibus_writereg(device_ptr_t dev, int phy, int reg, int data)
if (dev == NULL)
return;
- sc = USBGETSOFTC(dev);
+ sc = (void *)dev;
DPRINTFN(0xff, ("%s: %s: enter, phy=%d reg=0x%04x data=0x%04x\n",
sc->sc_dev.dv_xname, __func__, phy, reg, data));
@@ -1551,7 +1551,7 @@ url_miibus_statchg(device_ptr_t dev)
if (dev == NULL)
return;
- sc = USBGETSOFTC(dev);
+ sc = (void *)dev;
DPRINTF(("%s: %s: enter\n", sc->sc_dev.dv_xname, __func__));
#endif
/* Nothing to do */
@@ -1564,7 +1564,7 @@ url_miibus_statchg(device_ptr_t dev)
int
url_ext_miibus_redreg(device_ptr_t dev, int phy, int reg)
{
- struct url_softc *sc = USBGETSOFTC(dev);
+ struct url_softc *sc = (void *)dev;
u_int16_t val;
DPRINTF(("%s: %s: enter, phy=%d reg=0x%04x\n",
@@ -1608,7 +1608,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)
{
- struct url_softc *sc = USBGETSOFTC(dev);
+ struct url_softc *sc = (void *)dev;
DPRINTF(("%s: %s: enter, phy=%d reg=0x%04x data=0x%04x\n",
sc->sc_dev.dv_xname, __func__, phy, reg, data));
diff --git a/sys/dev/usb/usb_port.h b/sys/dev/usb/usb_port.h
index aa946e4aeed..6f10f5f1cb2 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.79 2007/06/10 17:46:27 mbalmer Exp $ */
+/* $OpenBSD: usb_port.h,v 1.80 2007/06/11 05:42:54 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 $ */
@@ -85,7 +85,6 @@ typedef struct proc *usb_proc_ptr;
#define slinear16_to_ulinear8_be linear16_to_ulinear8_be
typedef struct device *device_ptr_t;
-#define USBGETSOFTC(d) ((void *)(d))
#define DECLARE_USB_DMA_T \
struct usb_dma_block; \