summaryrefslogtreecommitdiff
path: root/sys/dev/ata
diff options
context:
space:
mode:
authorthorpej <thorpej@NetBSD.org>2006-03-28 17:38:24 +0000
committerthorpej <thorpej@NetBSD.org>2006-03-28 17:38:24 +0000
commit39cd836ee121586d7aeef7facf29276e7a66a7fb (patch)
treed6ca200abe74ecb5d379f372d93e5201b2677f51 /sys/dev/ata
parentd717ea85c2362092cc30ae655b160d0c9cf47294 (diff)
Use device_unit().
Diffstat (limited to 'sys/dev/ata')
-rw-r--r--sys/dev/ata/ata_raid_adaptec.c6
-rw-r--r--sys/dev/ata/ata_raid_promise.c6
-rw-r--r--sys/dev/ata/ld_ataraid.c6
-rw-r--r--sys/dev/ata/wd.c13
4 files changed, 16 insertions, 15 deletions
diff --git a/sys/dev/ata/ata_raid_adaptec.c b/sys/dev/ata/ata_raid_adaptec.c
index a4605ad2f9a..39f9697b80e 100644
--- a/sys/dev/ata/ata_raid_adaptec.c
+++ b/sys/dev/ata/ata_raid_adaptec.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ata_raid_adaptec.c,v 1.3 2006/03/25 22:55:55 thorpej Exp $ */
+/* $NetBSD: ata_raid_adaptec.c,v 1.4 2006/03/28 17:38:29 thorpej Exp $ */
/*-
* Copyright (c) 2000,2001,2002 Søren Schmidt <sos@FreeBSD.org>
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ata_raid_adaptec.c,v 1.3 2006/03/25 22:55:55 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ata_raid_adaptec.c,v 1.4 2006/03/28 17:38:29 thorpej Exp $");
#include <sys/param.h>
#include <sys/buf.h>
@@ -80,7 +80,7 @@ ata_raid_read_config_adaptec(struct wd_softc *sc)
bmajor = devsw_name2blk(sc->sc_dev.dv_xname, NULL, 0);
/* Get a vnode for the raw partition of this disk. */
- dev = MAKEDISKDEV(bmajor, sc->sc_dev.dv_unit, RAW_PART);
+ dev = MAKEDISKDEV(bmajor, device_unit(&sc->sc_dev), RAW_PART);
error = bdevvp(dev, &vp);
if (error)
goto out;
diff --git a/sys/dev/ata/ata_raid_promise.c b/sys/dev/ata/ata_raid_promise.c
index af17319b522..5fb0f4a4b2b 100644
--- a/sys/dev/ata/ata_raid_promise.c
+++ b/sys/dev/ata/ata_raid_promise.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ata_raid_promise.c,v 1.6 2005/12/11 12:21:14 christos Exp $ */
+/* $NetBSD: ata_raid_promise.c,v 1.7 2006/03/28 17:38:29 thorpej Exp $ */
/*-
* Copyright (c) 2000,2001,2002 Søren Schmidt <sos@FreeBSD.org>
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ata_raid_promise.c,v 1.6 2005/12/11 12:21:14 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ata_raid_promise.c,v 1.7 2006/03/28 17:38:29 thorpej Exp $");
#include <sys/param.h>
#include <sys/buf.h>
@@ -80,7 +80,7 @@ ata_raid_read_config_promise(struct wd_softc *sc)
bmajor = devsw_name2blk(sc->sc_dev.dv_xname, NULL, 0);
/* Get a vnode for the raw partition of this disk. */
- dev = MAKEDISKDEV(bmajor, sc->sc_dev.dv_unit, RAW_PART);
+ dev = MAKEDISKDEV(bmajor, device_unit(&sc->sc_dev), RAW_PART);
error = bdevvp(dev, &vp);
if (error)
goto out;
diff --git a/sys/dev/ata/ld_ataraid.c b/sys/dev/ata/ld_ataraid.c
index 0445a77559f..d382e5d6729 100644
--- a/sys/dev/ata/ld_ataraid.c
+++ b/sys/dev/ata/ld_ataraid.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ld_ataraid.c,v 1.14 2005/12/11 12:21:14 christos Exp $ */
+/* $NetBSD: ld_ataraid.c,v 1.15 2006/03/28 17:38:29 thorpej Exp $ */
/*
* Copyright (c) 2003 Wasabi Systems, Inc.
@@ -45,7 +45,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ld_ataraid.c,v 1.14 2005/12/11 12:21:14 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ld_ataraid.c,v 1.15 2006/03/28 17:38:29 thorpej Exp $");
#include "rnd.h"
@@ -200,7 +200,7 @@ ld_ataraid_attach(struct device *parent, struct device *self, void *aux)
dev_t dev;
bmajor = devsw_name2blk(adi->adi_dev->dv_xname, NULL, 0);
- dev = MAKEDISKDEV(bmajor, adi->adi_dev->dv_unit, RAW_PART);
+ dev = MAKEDISKDEV(bmajor, device_unit(adi->adi_dev), RAW_PART);
error = bdevvp(dev, &vp);
if (error)
break;
diff --git a/sys/dev/ata/wd.c b/sys/dev/ata/wd.c
index 76ce08458f8..4d0c6b5921a 100644
--- a/sys/dev/ata/wd.c
+++ b/sys/dev/ata/wd.c
@@ -1,4 +1,4 @@
-/* $NetBSD: wd.c,v 1.320 2006/03/01 12:38:13 yamt Exp $ */
+/* $NetBSD: wd.c,v 1.321 2006/03/28 17:38:29 thorpej Exp $ */
/*
* Copyright (c) 1998, 2001 Manuel Bouyer. All rights reserved.
@@ -66,7 +66,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wd.c,v 1.320 2006/03/01 12:38:13 yamt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wd.c,v 1.321 2006/03/28 17:38:29 thorpej Exp $");
#ifndef ATADEBUG
#define ATADEBUG
@@ -441,7 +441,7 @@ wddetach(struct device *self, int flags)
/* Nuke the vnodes for any open instances. */
for (i = 0; i < MAXPARTITIONS; i++) {
- mn = WDMINOR(self->dv_unit, i);
+ mn = WDMINOR(device_unit(self), i);
vdevgone(bmaj, mn, mn, VBLK);
vdevgone(cmaj, mn, mn, VCHR);
}
@@ -1060,8 +1060,9 @@ wdgetdisklabel(struct wd_softc *wd)
wd->drvp->drive_flags |= DRIVE_RESET;
splx(s);
}
- errstring = readdisklabel(MAKEWDDEV(0, wd->sc_dev.dv_unit, RAW_PART),
- wdstrategy, lp, wd->sc_dk.dk_cpulabel);
+ errstring = readdisklabel(MAKEWDDEV(0, device_unit(&wd->sc_dev),
+ RAW_PART), wdstrategy, lp,
+ wd->sc_dk.dk_cpulabel);
if (errstring) {
/*
* This probably happened because the drive's default
@@ -1074,7 +1075,7 @@ wdgetdisklabel(struct wd_softc *wd)
wd->drvp->drive_flags |= DRIVE_RESET;
splx(s);
}
- errstring = readdisklabel(MAKEWDDEV(0, wd->sc_dev.dv_unit,
+ errstring = readdisklabel(MAKEWDDEV(0, device_unit(&wd->sc_dev),
RAW_PART), wdstrategy, lp, wd->sc_dk.dk_cpulabel);
}
if (errstring) {