Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/gehenna-devsw]: src/sys/dev/qbus Add the character device switch.



details:   https://anonhg.NetBSD.org/src/rev/58fe4a6552da
branches:  gehenna-devsw
changeset: 527080:58fe4a6552da
user:      gehenna <gehenna%NetBSD.org@localhost>
date:      Thu May 16 11:54:08 2002 +0000

description:
Add the character device switch.
Fix type of arguments.

diffstat:

 sys/dev/qbus/dhu.c |  23 +++++++++++++++++++----
 1 files changed, 19 insertions(+), 4 deletions(-)

diffs (69 lines):

diff -r dab7eb0c72fd -r 58fe4a6552da sys/dev/qbus/dhu.c
--- a/sys/dev/qbus/dhu.c        Thu May 16 11:53:26 2002 +0000
+++ b/sys/dev/qbus/dhu.c        Thu May 16 11:54:08 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: dhu.c,v 1.26 2002/03/17 19:41:01 atatat Exp $  */
+/*     $NetBSD: dhu.c,v 1.26.4.1 2002/05/16 11:54:08 gehenna Exp $     */
 /*
  * Copyright (c) 1996  Ken C. Wellsch.  All rights reserved.
  * Copyright (c) 1992, 1993
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dhu.c,v 1.26 2002/03/17 19:41:01 atatat Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dhu.c,v 1.26.4.1 2002/05/16 11:54:08 gehenna Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -148,12 +148,24 @@
 static int     dhuiflow __P((struct tty *, int));
 static unsigned        dhumctl __P((struct dhu_softc *,int, int, int));
 
-cdev_decl(dhu);
-
 struct cfattach dhu_ca = {
        sizeof(struct dhu_softc), dhu_match, dhu_attach
 };
 
+dev_type_open(dhuopen);
+dev_type_close(dhuclose);
+dev_type_read(dhuread);
+dev_type_write(dhuwrite);
+dev_type_ioctl(dhuioctl);
+dev_type_stop(dhustop);
+dev_type_tty(dhutty);
+dev_type_poll(dhupoll);
+
+const struct cdevsw dhu_cdevsw = {
+       dhuopen, dhuclose, dhuread, dhuwrite, dhuioctl,
+       dhustop, dhutty, dhupoll, nommap, D_TTY
+};
+
 /* Autoconfig handles: setup the controller to interrupt, */
 /* then complete the housecleaning for full operation */
 
@@ -460,6 +472,7 @@
 dhuread(dev, uio, flag)
        dev_t dev;
        struct uio *uio;
+       int flag;
 {
        struct dhu_softc *sc;
        struct tty *tp;
@@ -474,6 +487,7 @@
 dhuwrite(dev, uio, flag)
        dev_t dev;
        struct uio *uio;
+       int flag;
 {
        struct dhu_softc *sc;
        struct tty *tp;
@@ -579,6 +593,7 @@
 void
 dhustop(tp, flag)
        struct tty *tp;
+       int flag;
 {
        struct dhu_softc *sc;
        int line;



Home | Main Index | Thread Index | Old Index