summaryrefslogtreecommitdiffstats
path: root/sys/dev
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1999-05-07 10:11:40 +0000
committerphk <phk@FreeBSD.org>1999-05-07 10:11:40 +0000
commit693dd58bb3e5843d252e25a15e2cc8d49323cb82 (patch)
treea0fbea49edf11184c1bafaed7d5b3cd858742449 /sys/dev
parentcfcd3ae08c30d66088e1ad5ffa68aa05b60e1bfe (diff)
downloadFreeBSD-src-693dd58bb3e5843d252e25a15e2cc8d49323cb82.zip
FreeBSD-src-693dd58bb3e5843d252e25a15e2cc8d49323cb82.tar.gz
Continue where Julian left off in July 1998:
Virtualize bdevsw[] from cdevsw. bdevsw() is now an (inline) function. Join CDEV_MODULE and BDEV_MODULE to DEV_MODULE (please pay attention to the order of the cmaj/bmaj arguments!) Join CDEV_DRIVER_MODULE and BDEV_DRIVER_MODULE to DEV_DRIVER_MODULE (ditto!) (Next step will be to convert all bdev dev_t's to cdev dev_t's before they get to do any damage^H^H^H^H^H^Hwork in the kernel.)
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/atkbdc/psm.c6
-rw-r--r--sys/dev/ccd/ccd.c4
-rw-r--r--sys/dev/fdc/fdc.c4
-rw-r--r--sys/dev/iicbus/iic.c6
-rw-r--r--sys/dev/sio/sio.c6
-rw-r--r--sys/dev/smbus/smb.c4
-rw-r--r--sys/dev/usb/ugen.c4
-rw-r--r--sys/dev/usb/ulpt.c4
-rw-r--r--sys/dev/usb/ums.c4
-rw-r--r--sys/dev/vinum/vinum.c3
-rw-r--r--sys/dev/vinum/vinumext.h4
-rw-r--r--sys/dev/vinum/vinumio.c4
-rw-r--r--sys/dev/vinum/vinumrequest.c6
-rw-r--r--sys/dev/vn/vn.c4
14 files changed, 30 insertions, 33 deletions
diff --git a/sys/dev/atkbdc/psm.c b/sys/dev/atkbdc/psm.c
index 39aaa78..70361ff 100644
--- a/sys/dev/atkbdc/psm.c
+++ b/sys/dev/atkbdc/psm.c
@@ -20,7 +20,7 @@
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: psm.c,v 1.4 1999/04/16 21:22:34 peter Exp $
+ * $Id: psm.c,v 1.5 1999/04/18 15:12:11 peter Exp $
*/
/*
@@ -2272,7 +2272,7 @@ psmresume(void *dummy)
}
#endif /* PSM_HOOKAPM */
-CDEV_DRIVER_MODULE(psm, atkbdc, psm_driver, psm_devclass,
- CDEV_MAJOR, psm_cdevsw, 0, 0);
+DEV_DRIVER_MODULE(psm, atkbdc, psm_driver, psm_devclass,
+ CDEV_MAJOR, NODEV, psm_cdevsw, 0, 0);
#endif /* NPSM > 0 */
diff --git a/sys/dev/ccd/ccd.c b/sys/dev/ccd/ccd.c
index f2e9525..c904d6c 100644
--- a/sys/dev/ccd/ccd.c
+++ b/sys/dev/ccd/ccd.c
@@ -1,4 +1,4 @@
-/* $Id: ccd.c,v 1.44 1999/05/06 19:19:30 phk Exp $ */
+/* $Id: ccd.c,v 1.45 1999/05/07 07:03:17 phk Exp $ */
/* $NetBSD: ccd.c,v 1.22 1995/12/08 19:13:26 thorpej Exp $ */
@@ -278,7 +278,7 @@ ccd_modevent(mod, type, data)
return (error);
}
-BDEV_MODULE(ccd, BDEV_MAJOR, CDEV_MAJOR, ccd_cdevsw, ccd_modevent, NULL);
+DEV_MODULE(ccd, CDEV_MAJOR, BDEV_MAJOR, ccd_cdevsw, ccd_modevent, NULL);
static int
ccdinit(ccd, cpaths, p)
diff --git a/sys/dev/fdc/fdc.c b/sys/dev/fdc/fdc.c
index b0f13ee..c4c86ee 100644
--- a/sys/dev/fdc/fdc.c
+++ b/sys/dev/fdc/fdc.c
@@ -47,7 +47,7 @@
* SUCH DAMAGE.
*
* from: @(#)fd.c 7.4 (Berkeley) 5/25/91
- * $Id: fd.c,v 1.138 1999/05/06 20:00:23 phk Exp $
+ * $Id: fd.c,v 1.139 1999/05/07 07:03:24 phk Exp $
*
*/
@@ -2364,7 +2364,7 @@ static driver_t fd_driver = {
sizeof(struct fd_data)
};
-BDEV_DRIVER_MODULE(fd, fdc, fd_driver, fd_devclass, BDEV_MAJOR, CDEV_MAJOR,
+DEV_DRIVER_MODULE(fd, fdc, fd_driver, fd_devclass, CDEV_MAJOR, BDEV_MAJOR,
fd_cdevsw, 0, 0);
#endif /* NFDC > 0 */
diff --git a/sys/dev/iicbus/iic.c b/sys/dev/iicbus/iic.c
index 6bcadf9..7925aa2 100644
--- a/sys/dev/iicbus/iic.c
+++ b/sys/dev/iicbus/iic.c
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: iic.c,v 1.6 1999/01/09 18:08:24 nsouch Exp $
+ * $Id: iic.c,v 1.7 1999/02/13 18:01:55 nsouch Exp $
*
*/
#include <sys/param.h>
@@ -277,7 +277,7 @@ iic_drvinit(void *unused)
}
}
-CDEV_DRIVER_MODULE(iic, iicbus, iic_driver, iic_devclass, CDEV_MAJOR,
- iic_cdevsw, 0, 0);
+DEV_DRIVER_MODULE(iic, iicbus, iic_driver, iic_devclass, CDEV_MAJOR,
+ NODEV, iic_cdevsw, 0, 0);
SYSINIT(iicdev,SI_SUB_DRIVERS,SI_ORDER_MIDDLE+CDEV_MAJOR,iic_drvinit,NULL)
diff --git a/sys/dev/sio/sio.c b/sys/dev/sio/sio.c
index 5e27f69..5211350 100644
--- a/sys/dev/sio/sio.c
+++ b/sys/dev/sio/sio.c
@@ -30,7 +30,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: sio.c,v 1.229 1999/05/06 18:44:35 peter Exp $
+ * $Id: sio.c,v 1.230 1999/05/07 06:50:27 mckusick Exp $
* from: @(#)com.c 7.5 (Berkeley) 5/16/91
* from: i386/isa sio.c,v 1.234
*/
@@ -3171,5 +3171,5 @@ siopnp_attach(u_long csn, u_long vend_id, char *name, struct isa_device *dev)
}
#endif
-CDEV_DRIVER_MODULE(sio, isa, sio_driver, sio_devclass,
- CDEV_MAJOR, sio_cdevsw, 0, 0);
+DEV_DRIVER_MODULE(sio, isa, sio_driver, sio_devclass,
+ CDEV_MAJOR, NODEV, sio_cdevsw, 0, 0);
diff --git a/sys/dev/smbus/smb.c b/sys/dev/smbus/smb.c
index cfb6f0e..8944e5d 100644
--- a/sys/dev/smbus/smb.c
+++ b/sys/dev/smbus/smb.c
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: smb.c,v 1.7 1999/02/13 17:57:19 nsouch Exp $
+ * $Id: smb.c,v 1.8 1999/02/14 14:36:45 nsouch Exp $
*
*/
#include <sys/param.h>
@@ -270,7 +270,7 @@ smb_drvinit(void *unused)
}
}
-CDEV_DRIVER_MODULE(smb, smbus, smb_driver, smb_devclass, CDEV_MAJOR,
+DEV_DRIVER_MODULE(smb, smbus, smb_driver, smb_devclass, CDEV_MAJOR, NODEV,
smb_cdevsw, 0, 0);
SYSINIT(smbdev,SI_SUB_DRIVERS,SI_ORDER_MIDDLE+CDEV_MAJOR,smb_drvinit,NULL)
diff --git a/sys/dev/usb/ugen.c b/sys/dev/usb/ugen.c
index cc14a7d..bebd853 100644
--- a/sys/dev/usb/ugen.c
+++ b/sys/dev/usb/ugen.c
@@ -997,6 +997,6 @@ ugen_detach(device_t self)
return 0;
}
-CDEV_DRIVER_MODULE(ugen, uhub, ugen_driver, ugen_devclass,
- UGEN_CDEV_MAJOR, ugen_cdevsw, usbd_driver_load, 0);
+DEV_DRIVER_MODULE(ugen, uhub, ugen_driver, ugen_devclass,
+ UGEN_CDEV_MAJOR, NODEV, ugen_cdevsw, usbd_driver_load, 0);
#endif
diff --git a/sys/dev/usb/ulpt.c b/sys/dev/usb/ulpt.c
index 9aaf024..677ef4b 100644
--- a/sys/dev/usb/ulpt.c
+++ b/sys/dev/usb/ulpt.c
@@ -442,6 +442,6 @@ ulpt_detach(device_t self)
return 0;
}
-CDEV_DRIVER_MODULE(ulpt, uhub, ulpt_driver, ulpt_devclass,
- ULPT_CDEV_MAJOR, ulpt_cdevsw, usbd_driver_load, 0);
+DEV_DRIVER_MODULE(ulpt, uhub, ulpt_driver, ulpt_devclass,
+ ULPT_CDEV_MAJOR, NODEV, ulpt_cdevsw, usbd_driver_load, 0);
#endif
diff --git a/sys/dev/usb/ums.c b/sys/dev/usb/ums.c
index fefd342..37888b3 100644
--- a/sys/dev/usb/ums.c
+++ b/sys/dev/usb/ums.c
@@ -795,6 +795,6 @@ ums_ioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct proc *p)
#endif
#if defined(__FreeBSD__)
-CDEV_DRIVER_MODULE(ums, uhub, ums_driver, ums_devclass,
- UMS_CDEV_MAJOR, ums_cdevsw, usbd_driver_load, 0);
+DEV_DRIVER_MODULE(ums, uhub, ums_driver, ums_devclass,
+ UMS_CDEV_MAJOR, NODEV, ums_cdevsw, usbd_driver_load, 0);
#endif
diff --git a/sys/dev/vinum/vinum.c b/sys/dev/vinum/vinum.c
index 8d30d5a..810c67d 100644
--- a/sys/dev/vinum/vinum.c
+++ b/sys/dev/vinum/vinum.c
@@ -33,7 +33,7 @@
* otherwise) arising in any way out of the use of this software, even if
* advised of the possibility of such damage.
*
- * $Id: vinum.c,v 1.24 1999/03/19 05:35:25 grog Exp grog $
+ * $Id: vinum.c,v 1.21 1999/05/07 08:07:08 grog Exp $
*/
#define STATIC static /* nothing while we're testing XXX */
@@ -237,7 +237,6 @@ vinum_modevent(module_t mod, modeventtype_t type, void *unused)
}
#endif
cdevsw[CDEV_MAJOR] = NULL; /* no cdevsw any more */
- bdevsw[BDEV_MAJOR] = NULL; /* nor bdevsw */
log(LOG_INFO, "vinum: unloaded\n"); /* tell the world */
return 0;
default:
diff --git a/sys/dev/vinum/vinumext.h b/sys/dev/vinum/vinumext.h
index fc3f1eb..071afdf 100644
--- a/sys/dev/vinum/vinumext.h
+++ b/sys/dev/vinum/vinumext.h
@@ -33,7 +33,7 @@
* otherwise) arising in any way out of the use of this software, even if
* advised of the possibility of such damage.
*
- * $Id: vinumext.h,v 1.19 1999/03/23 02:57:04 grog Exp grog $
+ * $Id: vinumext.h,v 1.15 1999/05/07 08:07:09 grog Exp $
*/
/* vinumext.h: external definitions */
@@ -132,8 +132,6 @@ d_strategy_t vinumstrategy;
d_ioctl_t vinumioctl;
d_dump_t vinumdump;
d_psize_t vinumsize;
-d_read_t physread;
-d_write_t physwrite;
int vinumstart(struct buf *bp, int reviveok);
int launch_requests(struct request *rq, int reviveok);
diff --git a/sys/dev/vinum/vinumio.c b/sys/dev/vinum/vinumio.c
index 991a8be..2651205 100644
--- a/sys/dev/vinum/vinumio.c
+++ b/sys/dev/vinum/vinumio.c
@@ -33,7 +33,7 @@
* otherwise) arising in any way out of the use of this software, even if
* advised of the possibility of such damage.
*
- * $Id: vinumio.c,v 1.24 1999/03/23 02:00:52 grog Exp grog $
+ * $Id: vinumio.c,v 1.23 1999/05/07 01:32:09 grog Exp $
*/
#include <dev/vinum/vinumhdr.h>
@@ -285,7 +285,7 @@ driveio(struct drive *drive, char *buf, size_t length, off_t offset, int flag)
bp->b_bcount = len;
bp->b_bufsize = len;
- (*bdevsw[major(bp->b_dev)]->d_strategy) (bp); /* initiate the transfer */
+ (*bdevsw(major(bp->b_dev))->d_strategy) (bp); /* initiate the transfer */
error = biowait(bp);
printf("driveio: %s dev 0x%x, block 0x%x, len 0x%lx, error %d\n", /* XXX */
diff --git a/sys/dev/vinum/vinumrequest.c b/sys/dev/vinum/vinumrequest.c
index f286dc7..477ec40 100644
--- a/sys/dev/vinum/vinumrequest.c
+++ b/sys/dev/vinum/vinumrequest.c
@@ -33,7 +33,7 @@
* otherwise) arising in any way out of the use of this software, even if
* advised of the possibility of such damage.
*
- * $Id: vinumrequest.c,v 1.23 1999/03/20 21:58:38 grog Exp grog $
+ * $Id: vinumrequest.c,v 1.21 1999/05/07 08:07:09 grog Exp $
*/
#include <dev/vinum/vinumhdr.h>
@@ -390,7 +390,7 @@ launch_requests(struct request *rq, int reviveok)
logrq(loginfo_rqe, (union rqinfou) rqe, rq->bp);
#endif
/* fire off the request */
- (*bdevsw[major(rqe->b.b_dev)]->d_strategy) (&rqe->b);
+ (*bdevsw(major(rqe->b.b_dev))->d_strategy) (&rqe->b);
}
/* XXX Do we need caching? Think about this more */
}
@@ -865,7 +865,7 @@ sdio(struct buf *bp)
sbp->b.b_vp->v_numoutput);
#endif
s = splbio();
- (*bdevsw[major(sbp->b.b_dev)]->d_strategy) (&sbp->b);
+ (*bdevsw(major(sbp->b.b_dev))->d_strategy) (&sbp->b);
splx(s);
}
diff --git a/sys/dev/vn/vn.c b/sys/dev/vn/vn.c
index 2037ee1..a26100c 100644
--- a/sys/dev/vn/vn.c
+++ b/sys/dev/vn/vn.c
@@ -38,7 +38,7 @@
* from: Utah Hdr: vn.c 1.13 94/04/02
*
* from: @(#)vn.c 8.6 (Berkeley) 4/1/94
- * $Id: vn.c,v 1.76 1999/04/27 11:14:13 phk Exp $
+ * $Id: vn.c,v 1.77 1999/05/07 07:03:20 phk Exp $
*/
/*
@@ -772,6 +772,6 @@ vn_modevent(module_t mod, int type, void *data)
return 0;
}
-BDEV_MODULE(vn, BDEV_MAJOR, CDEV_MAJOR, vn_cdevsw, vn_modevent, 0);
+DEV_MODULE(vn, CDEV_MAJOR, BDEV_MAJOR, vn_cdevsw, vn_modevent, 0);
#endif
OpenPOWER on IntegriCloud