summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authored <ed@FreeBSD.org>2008-10-27 11:45:31 +0000
committered <ed@FreeBSD.org>2008-10-27 11:45:31 +0000
commitdb4c3eb3503fc75f114b091d654cbd76ade7a357 (patch)
tree5e7a8425eb9de53532de6344a7ab1344bd577cc5
parent9cb666e0ca12133368dd12b157cbca7b33bfe021 (diff)
downloadFreeBSD-src-db4c3eb3503fc75f114b091d654cbd76ade7a357.zip
FreeBSD-src-db4c3eb3503fc75f114b091d654cbd76ade7a357.tar.gz
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.
-rw-r--r--sys/dev/cfe/cfe_console.c3
-rw-r--r--sys/dev/ofw/ofw_console.c4
-rw-r--r--sys/dev/xen/console/console.c1
-rw-r--r--sys/sys/cons.h2
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 */
};
OpenPOWER on IntegriCloud