[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090930100147.28440.87231.stgit@warthog.procyon.org.uk>
Date: Wed, 30 Sep 2009 11:01:47 +0100
From: David Howells <dhowells@...hat.com>
To: torvalds@...l.org, akpm@...ux-foundation.org, gregkh@...e.de
Cc: alan@...rguk.ukuu.org.uk, linux-kernel@...r.kernel.org,
David Howells <dhowells@...hat.com>
Subject: [PATCH] Make pty_driver and pty_slave_driver local vars in legacy BSD
pty code
Make the pty_driver and pty_slave_driver global variables into local vars of
legacy_pty_init() as that's the only thing that ever accesses the values.
Signed-off-by: David Howells <dhowells@...hat.com>
---
drivers/char/pty.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/char/pty.c b/drivers/char/pty.c
index 53761ce..6fe1f07 100644
--- a/drivers/char/pty.c
+++ b/drivers/char/pty.c
@@ -326,8 +326,6 @@ static const struct tty_operations pty_ops = {
/* Traditional BSD devices */
#ifdef CONFIG_LEGACY_PTYS
-static struct tty_driver *pty_driver, *pty_slave_driver;
-
static int pty_bsd_ioctl(struct tty_struct *tty, struct file *file,
unsigned int cmd, unsigned long arg)
{
@@ -356,6 +354,8 @@ static const struct tty_operations pty_ops_bsd = {
static void __init legacy_pty_init(void)
{
+ struct tty_driver *pty_driver, *pty_slave_driver;
+
if (legacy_count <= 0)
return;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists