Use device_unit().
This commit is contained in:
parent
5470d2a488
commit
f5bd442003
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: xbd_xenbus.c,v 1.5 2006/03/26 22:05:06 bouyer Exp $ */
|
||||
/* $NetBSD: xbd_xenbus.c,v 1.6 2006/03/29 04:41:56 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2006 Manuel Bouyer.
|
||||
|
@ -31,7 +31,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: xbd_xenbus.c,v 1.5 2006/03/26 22:05:06 bouyer Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: xbd_xenbus.c,v 1.6 2006/03/29 04:41:56 thorpej Exp $");
|
||||
|
||||
#include "opt_xen.h"
|
||||
#include "rnd.h"
|
||||
|
@ -263,7 +263,7 @@ xbd_xenbus_detach(struct device *dev, int flags)
|
|||
|
||||
/* Nuke the vnodes for any open instances. */
|
||||
for (i = 0; i < MAXPARTITIONS; i++) {
|
||||
mn = DISKMINOR(dev->dv_unit, i);
|
||||
mn = DISKMINOR(device_unit(dev), i);
|
||||
vdevgone(bmaj, mn, mn, VBLK);
|
||||
vdevgone(cmaj, mn, mn, VCHR);
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: cardslot.c,v 1.29 2006/03/29 04:16:48 thorpej Exp $ */
|
||||
/* $NetBSD: cardslot.c,v 1.30 2006/03/29 04:42:30 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1999 and 2000
|
||||
|
@ -33,7 +33,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: cardslot.c,v 1.29 2006/03/29 04:16:48 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: cardslot.c,v 1.30 2006/03/29 04:42:30 thorpej Exp $");
|
||||
|
||||
#include "opt_cardslot.h"
|
||||
|
||||
|
@ -112,7 +112,7 @@ cardslotattach(parent, self, aux)
|
|||
struct cardbus_softc *csc = NULL;
|
||||
struct pcmcia_softc *psc = NULL;
|
||||
|
||||
sc->sc_slot = sc->sc_dev.dv_unit;
|
||||
sc->sc_slot = device_unit(&sc->sc_dev);
|
||||
sc->sc_cb_softc = NULL;
|
||||
sc->sc_16_softc = NULL;
|
||||
SIMPLEQ_INIT(&sc->sc_events);
|
||||
|
|
Loading…
Reference in New Issue