From: Adrian Bunk <bunk@stusta.de>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org
Subject: [2.6 patch] drivers/char/tty_io.c: misc cleanups (fwd)
Date: Thu, 23 Dec 2004 01:37:19 +0100 [thread overview]
Message-ID: <20041223003719.GH5217@stusta.de> (raw)
The patch forwarded below still applies and compiles against
2.6.10-rc3-mm1.
Please apply.
----- Forwarded message from Adrian Bunk <bunk@stusta.de> -----
Date: Sun, 5 Dec 2004 18:23:23 +0100
From: Adrian Bunk <bunk@stusta.de>
To: linux-kernel@vger.kernel.org
Subject: [2.6 patch] drivers/char/tty_io.c: misc cleanups
The patch below contains the following cleanups:
- remove the unused global function tty_push_data
- make some needlessly global functions static
diffstat output:
drivers/char/tty_io.c | 28 +++-------------------------
1 files changed, 3 insertions(+), 25 deletions(-)
Signed-off-by: Adrian Bunk <bunk@stusta.de>
--- linux-2.6.10-rc1-mm3-full/drivers/char/tty_io.c.old 2004-11-07 01:25:45.000000000 +0100
+++ linux-2.6.10-rc1-mm3-full/drivers/char/tty_io.c 2004-11-07 01:28:36.000000000 +0100
@@ -327,7 +327,7 @@
EXPORT_SYMBOL_GPL(tty_ldisc_put);
-void tty_ldisc_assign(struct tty_struct *tty, struct tty_ldisc *ld)
+static void tty_ldisc_assign(struct tty_struct *tty, struct tty_ldisc *ld)
{
tty->ldisc = *ld;
tty->ldisc.refcount = 0;
@@ -583,7 +583,7 @@
/*
* This routine returns a tty driver structure, given a device number
*/
-struct tty_driver *get_tty_driver(dev_t device, int *index)
+static struct tty_driver *get_tty_driver(dev_t device, int *index)
{
struct tty_driver *p;
@@ -744,7 +744,7 @@
* but doesn't hold any locks, so we need to make sure we have the appropriate
* locks for what we're doing..
*/
-void do_tty_hangup(void *data)
+static void do_tty_hangup(void *data)
{
struct tty_struct *tty = (struct tty_struct *) data;
struct file * cons_filp = NULL;
@@ -2504,28 +2504,6 @@
}
/*
- * Call the ldisc flush directly from a driver. This function may
- * return an error and need retrying by the user.
- */
-
-int tty_push_data(struct tty_struct *tty, unsigned char *cp, unsigned char *fp, int count)
-{
- int ret = 0;
- struct tty_ldisc *disc;
-
- disc = tty_ldisc_ref(tty);
- if(test_bit(TTY_DONT_FLIP, &tty->flags))
- ret = -EAGAIN;
- else if(disc == NULL)
- ret = -EIO;
- else
- disc->receive_buf(tty, cp, fp, count);
- tty_ldisc_deref(disc);
- return ret;
-
-}
-
-/*
* Routine which returns the baud rate of the tty
*
* Note that the baud_table needs to be kept in sync with the
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
----- End forwarded message -----
reply other threads:[~2004-12-23 0:48 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20041223003719.GH5217@stusta.de \
--to=bunk@stusta.de \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.