summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorMarc Balmer <mbalmer@cvs.openbsd.org>2007-06-10 15:33:17 +0000
committerMarc Balmer <mbalmer@cvs.openbsd.org>2007-06-10 15:33:17 +0000
commit86916761cdd1d1dcac8c97af812a86b5033e70f6 (patch)
treecc3ed8b173864bd404ae5fe69aa0191c1c606a9d /sys/dev
parentaf43d601f3f24f23e93e84d63024f19fdc40afae (diff)
Remove the definition and use of USBDEVUNIT.
ok jsg.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/usb/usb.c6
-rw-r--r--sys/dev/usb/usb_port.h3
-rw-r--r--sys/dev/usb/usb_subr.c4
3 files changed, 6 insertions, 7 deletions
diff --git a/sys/dev/usb/usb.c b/sys/dev/usb/usb.c
index 8d58718b798..8d67cbf4dab 100644
--- a/sys/dev/usb/usb.c
+++ b/sys/dev/usb/usb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: usb.c,v 1.46 2007/06/10 14:49:01 mbalmer Exp $ */
+/* $OpenBSD: usb.c,v 1.47 2007/06/10 15:33:16 mbalmer Exp $ */
/* $NetBSD: usb.c,v 1.77 2003/01/01 00:10:26 thorpej Exp $ */
/*
@@ -177,7 +177,7 @@ usb_attach(struct device *parent, struct device *self, void *aux)
if (cold)
sc->sc_bus->use_polling++;
- ue.u.ue_ctrlr.ue_bus = USBDEVUNIT(sc->sc_dev);
+ ue.u.ue_ctrlr.ue_bus = sc->sc_dev.dv_unit;
usb_add_event(USB_EVENT_CTRLR_ATTACH, &ue);
#ifdef USB_USE_SOFTINTR
@@ -837,7 +837,7 @@ usb_detach(device_ptr_t self, int flags)
#endif
#endif
- ue.u.ue_ctrlr.ue_bus = USBDEVUNIT(sc->sc_dev);
+ ue.u.ue_ctrlr.ue_bus = sc->sc_dev.dv_unit;
usb_add_event(USB_EVENT_CTRLR_DETACH, &ue);
return (0);
diff --git a/sys/dev/usb/usb_port.h b/sys/dev/usb/usb_port.h
index d92999a3f1b..63bacadf693 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.77 2007/06/10 14:49:01 mbalmer Exp $ */
+/* $OpenBSD: usb_port.h,v 1.78 2007/06/10 15:33:16 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 USBDEVUNIT(bdev) ((bdev).dv_unit)
#define USBDEVPTRNAME(bdevptr) ((bdevptr)->dv_xname)
#define USBGETSOFTC(d) ((void *)(d))
diff --git a/sys/dev/usb/usb_subr.c b/sys/dev/usb/usb_subr.c
index b426eeac43d..5c220c5091f 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.52 2007/06/10 14:49:01 mbalmer Exp $ */
+/* $OpenBSD: usb_subr.c,v 1.53 2007/06/10 15:33:16 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 $ */
@@ -1244,7 +1244,7 @@ usbd_fill_deviceinfo(usbd_device_handle dev, struct usb_device_info *di,
struct usbd_port *p;
int i, err, s;
- di->udi_bus = USBDEVUNIT(dev->bus->bdev);
+ di->udi_bus = dev->bus->bdev.dv_unit;
di->udi_addr = dev->address;
di->udi_cookie = dev->cookie;
usbd_devinfo_vp(dev, di->udi_vendor, di->udi_product, usedev);