Date: Mon, 27 Oct 2008 11:45:31 +0000 (UTC) From: Ed Schouten <ed@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r184329 - in head/sys: dev/cfe dev/ofw dev/xen/console sys Message-ID: <200810271145.m9RBjVAY038315@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ed Date: Mon Oct 27 11:45:31 2008 New Revision: 184329 URL: http://svn.freebsd.org/changeset/base/184329 Log: 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. Modified: head/sys/dev/cfe/cfe_console.c head/sys/dev/ofw/ofw_console.c head/sys/dev/xen/console/console.c head/sys/sys/cons.h Modified: head/sys/dev/cfe/cfe_console.c ============================================================================== --- head/sys/dev/cfe/cfe_console.c Mon Oct 27 09:26:24 2008 (r184328) +++ head/sys/dev/cfe/cfe_console.c Mon Oct 27 11:45:31 2008 (r184329) @@ -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 Modified: head/sys/dev/ofw/ofw_console.c ============================================================================== --- head/sys/dev/ofw/ofw_console.c Mon Oct 27 09:26:24 2008 (r184328) +++ head/sys/dev/ofw/ofw_console.c Mon Oct 27 11:45:31 2008 (r184329) @@ -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 Modified: head/sys/dev/xen/console/console.c ============================================================================== --- head/sys/dev/xen/console/console.c Mon Oct 27 09:26:24 2008 (r184328) +++ head/sys/dev/xen/console/console.c Mon Oct 27 11:45:31 2008 (r184329) @@ -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); } Modified: head/sys/sys/cons.h ============================================================================== --- head/sys/sys/cons.h Mon Oct 27 09:26:24 2008 (r184328) +++ head/sys/sys/cons.h Mon Oct 27 11:45:31 2008 (r184329) @@ -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 */ };
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200810271145.m9RBjVAY038315>