Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/luna68k - move prototypes to common header file



details:   https://anonhg.NetBSD.org/src/rev/3c08f8b72e3c
branches:  trunk
changeset: 340070:3c08f8b72e3c
user:      christos <christos%NetBSD.org@localhost>
date:      Fri Aug 21 10:48:06 2015 +0000

description:
- move prototypes to common header file
- rename function to avoid confusion with pseudo-device attach

diffstat:

 sys/arch/luna68k/dev/lunaws.c      |   8 +++-----
 sys/arch/luna68k/dev/siotty.c      |  10 ++++------
 sys/arch/luna68k/dev/syscn.h       |   6 ++++++
 sys/arch/luna68k/luna68k/machdep.c |   9 +++++----
 4 files changed, 18 insertions(+), 15 deletions(-)

diffs (135 lines):

diff -r 83bf33584a6a -r 3c08f8b72e3c sys/arch/luna68k/dev/lunaws.c
--- a/sys/arch/luna68k/dev/lunaws.c     Fri Aug 21 10:47:53 2015 +0000
+++ b/sys/arch/luna68k/dev/lunaws.c     Fri Aug 21 10:48:06 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lunaws.c,v 1.30 2014/07/20 11:14:56 tsutsui Exp $ */
+/* $NetBSD: lunaws.c,v 1.31 2015/08/21 10:48:06 christos Exp $ */
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: lunaws.c,v 1.30 2014/07/20 11:14:56 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lunaws.c,v 1.31 2015/08/21 10:48:06 christos Exp $");
 
 #include "opt_wsdisplay_compat.h"
 #include "wsmouse.h"
@@ -50,6 +50,7 @@
 #include <luna68k/dev/omkbdmap.h>
 #include <luna68k/dev/sioreg.h>
 #include <luna68k/dev/siovar.h>
+#include <luna68k/dev/syscn.h>
 
 #include "ioconf.h"
 
@@ -128,9 +129,6 @@
 CFATTACH_DECL_NEW(ws, sizeof(struct ws_softc),
     wsmatch, wsattach, NULL, NULL);
 
-extern int  syscngetc(dev_t);
-extern void syscnputc(dev_t, int);
-
 static int
 wsmatch(device_t parent, cfdata_t cf, void *aux)
 {
diff -r 83bf33584a6a -r 3c08f8b72e3c sys/arch/luna68k/dev/siotty.c
--- a/sys/arch/luna68k/dev/siotty.c     Fri Aug 21 10:47:53 2015 +0000
+++ b/sys/arch/luna68k/dev/siotty.c     Fri Aug 21 10:48:06 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: siotty.c,v 1.43 2015/08/20 14:40:17 christos Exp $ */
+/* $NetBSD: siotty.c,v 1.44 2015/08/21 10:48:06 christos Exp $ */
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: siotty.c,v 1.43 2015/08/20 14:40:17 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: siotty.c,v 1.44 2015/08/21 10:48:06 christos Exp $");
 
 #include "opt_ddb.h"
 
@@ -53,6 +53,7 @@
 
 #include <luna68k/dev/sioreg.h>
 #include <luna68k/dev/siovar.h>
+#include <luna68k/dev/syscn.h>
 
 #include "ioconf.h"
 
@@ -693,9 +694,6 @@
 
 /*---------------------  console interface ----------------------*/
 
-int  syscngetc(dev_t);
-void syscnputc(dev_t, int);
-
 struct consdev syscons = {
        NULL,
        NULL,
@@ -710,7 +708,7 @@
 };
 
 /* EXPORT */ void
-syscnattach(int channel)
+syscninit(int channel)
 {
 /*
  * Channel A is immediately initialized with 9600N1 right after cold
diff -r 83bf33584a6a -r 3c08f8b72e3c sys/arch/luna68k/dev/syscn.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/luna68k/dev/syscn.h      Fri Aug 21 10:48:06 2015 +0000
@@ -0,0 +1,6 @@
+/*     $NetBSD: syscn.h,v 1.1 2015/08/21 10:48:06 christos Exp $       */
+
+void syscninit(int);
+int  syscngetc(dev_t);
+void syscnputc(dev_t, int);
+
diff -r 83bf33584a6a -r 3c08f8b72e3c sys/arch/luna68k/luna68k/machdep.c
--- a/sys/arch/luna68k/luna68k/machdep.c        Fri Aug 21 10:47:53 2015 +0000
+++ b/sys/arch/luna68k/luna68k/machdep.c        Fri Aug 21 10:48:06 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.98 2014/03/24 19:46:24 christos Exp $ */
+/* $NetBSD: machdep.c,v 1.99 2015/08/21 10:48:06 christos Exp $ */
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.98 2014/03/24 19:46:24 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.99 2015/08/21 10:48:06 christos Exp $");
 
 #include "opt_ddb.h"
 #include "opt_kgdb.h"
@@ -84,6 +84,8 @@
 #include <machine/pte.h>
 #include <machine/kcore.h>     /* XXX should be pulled in by sys/kcore.h */
 
+#include <luna68k/dev/syscn.h>
+
 #include <dev/cons.h>
 #include <dev/mm.h>
 
@@ -137,7 +139,6 @@
 extern struct consdev syscons;
 extern void omfb_cnattach(void);
 extern void ws_cnattach(void);
-extern void syscnattach(int);
 
 /*
  * On the 68020/68030, the value of delay_divisor is roughly
@@ -248,7 +249,7 @@
 {
 
        if (sysconsole == 0)
-               syscnattach(0);
+               syscninit(0);
        else {
                omfb_cnattach();
                ws_cnattach();



Home | Main Index | Thread Index | Old Index