Commit d88405d4 authored by Jiri Slaby's avatar Jiri Slaby Committed by Greg Kroah-Hartman

TTY: simserial, remove tmp_buf

It is totally unused.
Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent fd2d7a6e
...@@ -55,8 +55,6 @@ struct tty_driver *hp_simserial_driver; ...@@ -55,8 +55,6 @@ struct tty_driver *hp_simserial_driver;
static struct console *console; static struct console *console;
static unsigned char *tmp_buf;
extern struct console *console_drivers; /* from kernel/printk.c */ extern struct console *console_drivers; /* from kernel/printk.c */
/* /*
...@@ -237,7 +235,8 @@ static int rs_write(struct tty_struct * tty, ...@@ -237,7 +235,8 @@ static int rs_write(struct tty_struct * tty,
int c, ret = 0; int c, ret = 0;
unsigned long flags; unsigned long flags;
if (!tty || !info->xmit.buf || !tmp_buf) return 0; if (!tty || !info->xmit.buf)
return 0;
local_irq_save(flags); local_irq_save(flags);
while (1) { while (1) {
...@@ -618,7 +617,6 @@ static int rs_open(struct tty_struct *tty, struct file * filp) ...@@ -618,7 +617,6 @@ static int rs_open(struct tty_struct *tty, struct file * filp)
{ {
struct serial_state *info = rs_table + tty->index; struct serial_state *info = rs_table + tty->index;
int retval; int retval;
unsigned long page;
info->tport.count++; info->tport.count++;
info->tport.tty = tty; info->tport.tty = tty;
...@@ -630,16 +628,6 @@ static int rs_open(struct tty_struct *tty, struct file * filp) ...@@ -630,16 +628,6 @@ static int rs_open(struct tty_struct *tty, struct file * filp)
#endif #endif
tty->low_latency = (info->tport.flags & ASYNC_LOW_LATENCY) ? 1 : 0; tty->low_latency = (info->tport.flags & ASYNC_LOW_LATENCY) ? 1 : 0;
if (!tmp_buf) {
page = get_zeroed_page(GFP_KERNEL);
if (!page)
return -ENOMEM;
if (tmp_buf)
free_page(page);
else
tmp_buf = (unsigned char *) page;
}
/* /*
* If the port is the middle of closing, bail out now * If the port is the middle of closing, bail out now
*/ */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment