From db4c3eb3503fc75f114b091d654cbd76ade7a357 Mon Sep 17 00:00:00 2001 From: ed Date: Mon, 27 Oct 2008 11:45:31 +0000 Subject: Remove unused consdev structure fields. The cn_unit and cn_tp fields don't seem to be used anywhere. Some drivers set them, while others don't. Just remove them, in an attempt to make our consdev code a little easier to understand. --- sys/dev/cfe/cfe_console.c | 3 +-- sys/dev/ofw/ofw_console.c | 4 +--- sys/dev/xen/console/console.c | 1 - sys/sys/cons.h | 2 -- 4 files changed, 2 insertions(+), 8 deletions(-) diff --git a/sys/dev/cfe/cfe_console.c b/sys/dev/cfe/cfe_console.c index 6d19947..fbd44f8 100644 --- a/sys/dev/cfe/cfe_console.c +++ b/sys/dev/cfe/cfe_console.c @@ -173,8 +173,7 @@ static void cfe_cninit(struct consdev *cp) { - sprintf(cp->cn_name, "cfecons"); - cp->cn_tp = cfe_tp; + strcpy(cp->cn_name, "cfecons"); } static void diff --git a/sys/dev/ofw/ofw_console.c b/sys/dev/ofw/ofw_console.c index bec52d6..493bb78 100644 --- a/sys/dev/ofw/ofw_console.c +++ b/sys/dev/ofw/ofw_console.c @@ -60,7 +60,6 @@ static struct ttydevsw ofw_ttydevsw = { .tsw_outwakeup = ofwtty_outwakeup, }; -static struct tty *ofw_tp = NULL; static int polltime; static struct callout_handle ofw_timeouthandle = CALLOUT_HANDLE_INITIALIZER(&ofw_timeouthandle); @@ -186,8 +185,7 @@ ofw_cninit(struct consdev *cp) { /* XXX: This is the alias, but that should be good enough */ - sprintf(cp->cn_name, "ofwcons"); - cp->cn_tp = ofw_tp; + strcpy(cp->cn_name, "ofwcons"); } static void diff --git a/sys/dev/xen/console/console.c b/sys/dev/xen/console/console.c index da778d6..5b556c2 100644 --- a/sys/dev/xen/console/console.c +++ b/sys/dev/xen/console/console.c @@ -107,7 +107,6 @@ static void xccnprobe(struct consdev *cp) { cp->cn_pri = CN_REMOTE; - cp->cn_tp = xccons; sprintf(cp->cn_name, "%s0", driver_name); } diff --git a/sys/sys/cons.h b/sys/sys/cons.h index 14fc961..ac97ce4 100644 --- a/sys/sys/cons.h +++ b/sys/sys/cons.h @@ -61,10 +61,8 @@ struct consdev { /* kernel "return char if available" interface */ cn_putc_t *cn_putc; /* kernel putchar interface */ - struct tty *cn_tp; /* tty structure for console device */ short cn_pri; /* pecking order; the higher the better */ void *cn_arg; /* drivers method argument */ - int cn_unit; /* some drivers prefer this */ int cn_flags; /* capabilities of this console */ char cn_name[SPECNAMELEN + 1]; /* console (device) name */ }; -- cgit v1.1