aboutsummaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/ofw/ofw_console.c10
-rw-r--r--sys/dev/sab/sab.c8
-rw-r--r--sys/dev/sio/sio.c29
-rw-r--r--sys/dev/syscons/syscons.c8
-rw-r--r--sys/dev/zs/zs.c8
5 files changed, 35 insertions, 28 deletions
diff --git a/sys/dev/ofw/ofw_console.c b/sys/dev/ofw/ofw_console.c
index 149739fce878..379a75322198 100644
--- a/sys/dev/ofw/ofw_console.c
+++ b/sys/dev/ofw/ofw_console.c
@@ -224,7 +224,7 @@ ofw_tty_start(struct tty *tp)
tp->t_state |= TS_BUSY;
while (tp->t_outq.c_cc != 0) {
- ofw_cons_putc(tp->t_dev, getc(&tp->t_outq));
+ ofw_cons_putc(NULL, getc(&tp->t_outq));
}
tp->t_state &= ~TS_BUSY;
@@ -250,7 +250,7 @@ ofw_timeout(void *v)
tp = (struct tty *)v;
- while ((c = ofw_cons_checkc(tp->t_dev)) != -1) {
+ while ((c = ofw_cons_checkc(NULL)) != -1) {
if (tp->t_state & TS_ISOPEN) {
(*linesw[tp->t_line].l_rint)(c, tp);
}
@@ -292,7 +292,7 @@ ofw_cons_init(struct consdev *cp)
}
static int
-ofw_cons_getc(dev_t dev)
+ofw_cons_getc(struct consdev *cp)
{
unsigned char ch;
int l;
@@ -314,7 +314,7 @@ ofw_cons_getc(dev_t dev)
}
static int
-ofw_cons_checkc(dev_t dev)
+ofw_cons_checkc(struct consdev *cp)
{
unsigned char ch;
@@ -330,7 +330,7 @@ ofw_cons_checkc(dev_t dev)
}
static void
-ofw_cons_putc(dev_t dev, int c)
+ofw_cons_putc(struct consdev *cp, int c)
{
char cbuf;
diff --git a/sys/dev/sab/sab.c b/sys/dev/sab/sab.c
index 0540dcfcc4f8..9218beed4984 100644
--- a/sys/dev/sab/sab.c
+++ b/sys/dev/sab/sab.c
@@ -1132,7 +1132,7 @@ sab_cnterm(struct consdev *cn)
}
static int
-sab_cngetc(dev_t dev)
+sab_cngetc(struct consdev *cn)
{
struct sabtty_softc *sc = sabtty_cons;
@@ -1142,7 +1142,7 @@ sab_cngetc(dev_t dev)
}
static int
-sab_cncheckc(dev_t dev)
+sab_cncheckc(struct consdev *cn)
{
struct sabtty_softc *sc = sabtty_cons;
@@ -1152,7 +1152,7 @@ sab_cncheckc(dev_t dev)
}
static void
-sab_cnputc(dev_t dev, int c)
+sab_cnputc(struct consdev *cn, int c)
{
struct sabtty_softc *sc = sabtty_cons;
@@ -1162,7 +1162,7 @@ sab_cnputc(dev_t dev, int c)
}
static void
-sab_cndbctl(dev_t dev, int c)
+sab_cndbctl(struct consdev *cn, int c)
{
}
diff --git a/sys/dev/sio/sio.c b/sys/dev/sio/sio.c
index 7efb6689ab1b..8d7f95aab583 100644
--- a/sys/dev/sio/sio.c
+++ b/sys/dev/sio/sio.c
@@ -2773,6 +2773,8 @@ CONS_DRIVER(sio, siocnprobe, siocninit, siocnterm, siocngetc, siocncheckc,
/* To get the GDB related variables */
#if DDB > 0
#include <ddb/ddb.h>
+static struct consdev gdbconsdev;
+
#endif
static void
@@ -2982,7 +2984,8 @@ siocnprobe(cp)
siogdbiobase = iobase;
siogdbunit = unit;
#if DDB > 0
- gdb_arg = makedev(CDEV_MAJOR, unit);
+ gdbconsdev.cn_dev = makedev(CDEV_MAJOR, unit);
+ gdb_arg = &gdbconsdev;
gdb_getc = siocngetc;
gdb_putc = siocnputc;
#endif
@@ -3003,7 +3006,8 @@ siocnprobe(cp)
printf("configuration file (currently sio only).\n");
siogdbiobase = siocniobase;
siogdbunit = siocnunit;
- gdb_arg = makedev(CDEV_MAJOR, siocnunit);
+ gdbconsdev.cn_dev = makedev(CDEV_MAJOR, siocnunit);
+ gdb_arg = &gdbconsdev;
gdb_getc = siocngetc;
gdb_putc = siocnputc;
}
@@ -3090,7 +3094,8 @@ siogdbattach(port, speed)
printf("sio%d: gdb debugging port\n", unit);
siogdbunit = unit;
#if DDB > 0
- gdb_arg = makedev(CDEV_MAJOR, unit);
+ gdbconsdev.cn_dev = makedev(CDEV_MAJOR, unit);
+ gdb_arg = &gdbconsdev;
gdb_getc = siocngetc;
gdb_putc = siocnputc;
#endif
@@ -3122,15 +3127,16 @@ siogdbattach(port, speed)
#endif
static int
-siocncheckc(dev)
- dev_t dev;
+siocncheckc(struct consdev *cd)
{
int c;
+ dev_t dev;
Port_t iobase;
int s;
struct siocnstate sp;
speed_t speed;
-
+
+ dev = cd->cn_dev;
if (minor(dev) == siocnunit) {
iobase = siocniobase;
speed = comdefaultrate;
@@ -3151,15 +3157,16 @@ siocncheckc(dev)
static int
-siocngetc(dev)
- dev_t dev;
+siocngetc(struct consdev *cd)
{
int c;
+ dev_t dev;
Port_t iobase;
int s;
struct siocnstate sp;
speed_t speed;
+ dev = cd->cn_dev;
if (minor(dev) == siocnunit) {
iobase = siocniobase;
speed = comdefaultrate;
@@ -3178,16 +3185,16 @@ siocngetc(dev)
}
static void
-siocnputc(dev, c)
- dev_t dev;
- int c;
+siocnputc(struct consdev *cd, int c)
{
int need_unlock;
int s;
+ dev_t dev;
struct siocnstate sp;
Port_t iobase;
speed_t speed;
+ dev = cd->cn_dev;
if (minor(dev) == siocnunit) {
iobase = siocniobase;
speed = comdefaultrate;
diff --git a/sys/dev/syscons/syscons.c b/sys/dev/syscons/syscons.c
index aad98aaea47c..aeb80fa8c793 100644
--- a/sys/dev/syscons/syscons.c
+++ b/sys/dev/syscons/syscons.c
@@ -1468,7 +1468,7 @@ sccnattach(void)
#endif /* __alpha__ */
static void
-sccnputc(dev_t dev, int c)
+sccnputc(struct consdev *cd, int c)
{
u_char buf[1];
scr_stat *scp = sc_console;
@@ -1510,19 +1510,19 @@ sccnputc(dev_t dev, int c)
}
static int
-sccngetc(dev_t dev)
+sccngetc(struct consdev *cd)
{
return sccngetch(0);
}
static int
-sccncheckc(dev_t dev)
+sccncheckc(struct consdev *cd)
{
return sccngetch(SCGETC_NONBLOCK);
}
static void
-sccndbctl(dev_t dev, int on)
+sccndbctl(struct consdev *cd, int on)
{
/* assert(sc_console_unit >= 0) */
/* try to switch to the kernel console screen */
diff --git a/sys/dev/zs/zs.c b/sys/dev/zs/zs.c
index 24e78d316533..4f54b413822f 100644
--- a/sys/dev/zs/zs.c
+++ b/sys/dev/zs/zs.c
@@ -890,7 +890,7 @@ zs_cnterm(struct consdev *cn)
}
static int
-zs_cngetc(dev_t dev)
+zs_cngetc(struct consdev *cn)
{
struct zstty_softc *sc = zstty_cons;
@@ -900,7 +900,7 @@ zs_cngetc(dev_t dev)
}
static int
-zs_cncheckc(dev_t dev)
+zs_cncheckc(struct consdev *cn)
{
struct zstty_softc *sc = zstty_cons;
@@ -910,7 +910,7 @@ zs_cncheckc(dev_t dev)
}
static void
-zs_cnputc(dev_t dev, int c)
+zs_cnputc(struct consdev *cn, int c)
{
struct zstty_softc *sc = zstty_cons;
@@ -920,7 +920,7 @@ zs_cnputc(dev_t dev, int c)
}
static void
-zs_cndbctl(dev_t dev, int c)
+zs_cndbctl(struct consdev *cn, int c)
{
}