summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/dev/syscons/syscons.c30
-rw-r--r--sys/dev/uart/uart_tty.c13
-rw-r--r--sys/gdb/gdb_cons.c11
3 files changed, 20 insertions, 34 deletions
diff --git a/sys/dev/syscons/syscons.c b/sys/dev/syscons/syscons.c
index b479451..c42fcf8 100644
--- a/sys/dev/syscons/syscons.c
+++ b/sys/dev/syscons/syscons.c
@@ -217,15 +217,13 @@ static int update_kbd_state(scr_stat *scp, int state, int mask);
static int update_kbd_leds(scr_stat *scp, int which);
static timeout_t blink_screen;
-static cn_probe_t sccnprobe;
-static cn_init_t sccninit;
-static cn_getc_t sccngetc;
-static cn_checkc_t sccncheckc;
-static cn_putc_t sccnputc;
-static cn_term_t sccnterm;
+static cn_probe_t sc_cnprobe;
+static cn_init_t sc_cninit;
+static cn_term_t sc_cnterm;
+static cn_getc_t sc_cngetc;
+static cn_putc_t sc_cnputc;
-CONS_DRIVER(sc, sccnprobe, sccninit, sccnterm, sccngetc, sccncheckc, sccnputc,
- NULL);
+CONSOLE_DRIVER(sc);
static d_open_t scopen;
static d_close_t scclose;
@@ -1404,7 +1402,7 @@ scstart(struct tty *tp)
}
static void
-sccnprobe(struct consdev *cp)
+sc_cnprobe(struct consdev *cp)
{
int unit;
int flags;
@@ -1426,7 +1424,7 @@ sccnprobe(struct consdev *cp)
}
static void
-sccninit(struct consdev *cp)
+sc_cninit(struct consdev *cp)
{
int unit;
int flags;
@@ -1439,7 +1437,7 @@ sccninit(struct consdev *cp)
}
static void
-sccnterm(struct consdev *cp)
+sc_cnterm(struct consdev *cp)
{
/* we are not the kernel console any more, release everything */
@@ -1457,7 +1455,7 @@ sccnterm(struct consdev *cp)
}
static void
-sccnputc(struct consdev *cd, int c)
+sc_cnputc(struct consdev *cd, int c)
{
u_char buf[1];
scr_stat *scp = sc_console;
@@ -1499,13 +1497,7 @@ sccnputc(struct consdev *cd, int c)
}
static int
-sccngetc(struct consdev *cd)
-{
- return sccngetch(0);
-}
-
-static int
-sccncheckc(struct consdev *cd)
+sc_cngetc(struct consdev *cd)
{
return sccngetch(SCGETC_NONBLOCK);
}
diff --git a/sys/dev/uart/uart_tty.c b/sys/dev/uart/uart_tty.c
index df3d9eb..b54c94a 100644
--- a/sys/dev/uart/uart_tty.c
+++ b/sys/dev/uart/uart_tty.c
@@ -54,11 +54,9 @@ static cn_probe_t uart_cnprobe;
static cn_init_t uart_cninit;
static cn_term_t uart_cnterm;
static cn_getc_t uart_cngetc;
-static cn_checkc_t uart_cncheckc;
static cn_putc_t uart_cnputc;
-CONS_DRIVER(uart, uart_cnprobe, uart_cninit, uart_cnterm, uart_cngetc,
- uart_cncheckc, uart_cnputc, NULL);
+CONSOLE_DRIVER(uart);
static struct uart_devinfo uart_console;
@@ -118,17 +116,10 @@ uart_cnputc(struct consdev *cp, int c)
}
static int
-uart_cncheckc(struct consdev *cp)
-{
-
- return (uart_poll(cp->cn_arg));
-}
-
-static int
uart_cngetc(struct consdev *cp)
{
- return (uart_getc(cp->cn_arg));
+ return (uart_poll(cp->cn_arg));
}
static int
diff --git a/sys/gdb/gdb_cons.c b/sys/gdb/gdb_cons.c
index 750b031..edd4406 100644
--- a/sys/gdb/gdb_cons.c
+++ b/sys/gdb/gdb_cons.c
@@ -82,8 +82,13 @@ gdb_cninit(struct consdev *cp)
}
}
+static void
+gdb_cnterm(struct consdev *cp)
+{
+}
+
static int
-gdb_nogetc(struct consdev *cp)
+gdb_cngetc(struct consdev *cp)
{
return -1;
}
@@ -154,9 +159,7 @@ gdb_cnputc(struct consdev *cp, int c)
}
}
-/* NB: no get interface, we supply nogetc for checkc too */
-CONS_DRIVER(gdb, gdb_cnprobe, gdb_cninit, NULL, gdb_nogetc, gdb_nogetc,
- gdb_cnputc, NULL);
+CONSOLE_DRIVER(gdb);
/*
* Our console device only gets attached if the system is booted
OpenPOWER on IntegriCloud