From owner-svn-src-head@FreeBSD.ORG Mon Oct 27 11:45:32 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2F7E7106567E; Mon, 27 Oct 2008 11:45:32 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1D0E08FC13; Mon, 27 Oct 2008 11:45:32 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9RBjVN2038318; Mon, 27 Oct 2008 11:45:32 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9RBjVAY038315; Mon, 27 Oct 2008 11:45:31 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <200810271145.m9RBjVAY038315@svn.freebsd.org> From: Ed Schouten Date: Mon, 27 Oct 2008 11:45:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184329 - in head/sys: dev/cfe dev/ofw dev/xen/console sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Oct 2008 11:45:32 -0000 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 */ };