Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/news68k/dev Initialize struct consdev more properly.



details:   https://anonhg.NetBSD.org/src/rev/5ad993a6b860
branches:  trunk
changeset: 546577:5ad993a6b860
user:      tsutsui <tsutsui%NetBSD.org@localhost>
date:      Thu May 01 23:25:52 2003 +0000

description:
Initialize struct consdev more properly.

diffstat:

 sys/arch/news68k/dev/zs.c |  22 +++++++++++++---------
 1 files changed, 13 insertions(+), 9 deletions(-)

diffs (51 lines):

diff -r a3e872fe54db -r 5ad993a6b860 sys/arch/news68k/dev/zs.c
--- a/sys/arch/news68k/dev/zs.c Thu May 01 23:02:35 2003 +0000
+++ b/sys/arch/news68k/dev/zs.c Thu May 01 23:25:52 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: zs.c,v 1.16 2003/05/01 23:02:35 tsutsui Exp $  */
+/*     $NetBSD: zs.c,v 1.17 2003/05/01 23:25:52 tsutsui Exp $  */
 
 /*-
  * Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -590,20 +590,16 @@
        zscnputc,
        nullcnpollc,
        NULL,
+       NULL,
+       NULL,
+       NODEV,
+       CN_DEAD
 };
 
 static void
 zscnprobe(cn)
        struct consdev *cn;
 {
-       extern const struct cdevsw zstty_cdevsw;
-       extern int tty00_is_console;
-
-       cn->cn_dev = makedev(cdevsw_lookup_major(&zstty_cdevsw), 0);
-       if (tty00_is_console)
-               cn->cn_pri = CN_REMOTE;
-       else
-               cn->cn_pri = CN_NORMAL;
 }
 
 static void
@@ -612,8 +608,16 @@
 {
        struct zs_chanstate *cs;
 
+       extern const struct cdevsw zstty_cdevsw;
+       extern int tty00_is_console;
        extern volatile u_char *sccport0a;
 
+       cn->cn_dev = makedev(cdevsw_lookup_major(&zstty_cdevsw), 0);
+       if (tty00_is_console)
+               cn->cn_pri = CN_REMOTE;
+       else
+               cn->cn_pri = CN_NORMAL;
+
        zc_cons = (struct zschan *)sccport0a; /* XXX */
 
        zs_conschan = cs = &zs_conschan_store;



Home | Main Index | Thread Index | Old Index