Use device_unit().

This commit is contained in:
thorpej 2006-03-29 04:41:56 +00:00
parent 5470d2a488
commit f5bd442003
2 changed files with 6 additions and 6 deletions

View File

@ -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);
}

View File

@ -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);