diff options
author | Jiri Slaby <jslaby@suse.cz> | 2012-04-02 07:53:45 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-04-09 14:14:49 -0400 |
commit | 37f00f62affe2ff673a9d5e93fcab154b0e8406c (patch) | |
tree | e22dadd972a77b9b7326d45e0ea9fbfe81a27c13 /drivers/tty/serial/crisv10.c | |
parent | 0034102808e0dbbf3a2394b82b1bb40b5778de9e (diff) |
TTY: crisv10, remove unused tmp_buf
This used to be a helper buffer for generic_serial. generic_serial is
gone, tmp_buf shall be removed.
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Mikael Starvik <starvik@axis.com>
Acked-by: Jesper Nilsson <jesper.nilsson@axis.com>
Cc: linux-cris-kernel@axis.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/crisv10.c')
-rw-r--r-- | drivers/tty/serial/crisv10.c | 27 |
1 files changed, 1 insertions, 26 deletions
diff --git a/drivers/tty/serial/crisv10.c b/drivers/tty/serial/crisv10.c index 5b07c0c3a10c..004ee2e9003a 100644 --- a/drivers/tty/serial/crisv10.c +++ b/drivers/tty/serial/crisv10.c | |||
@@ -952,19 +952,6 @@ static const struct control_pins e100_modem_pins[NR_PORTS] = | |||
952 | /* Input */ | 952 | /* Input */ |
953 | #define E100_DSR_GET(info) ((*e100_modem_pins[(info)->line].dsr_port) & e100_modem_pins[(info)->line].dsr_mask) | 953 | #define E100_DSR_GET(info) ((*e100_modem_pins[(info)->line].dsr_port) & e100_modem_pins[(info)->line].dsr_mask) |
954 | 954 | ||
955 | |||
956 | /* | ||
957 | * tmp_buf is used as a temporary buffer by serial_write. We need to | ||
958 | * lock it in case the memcpy_fromfs blocks while swapping in a page, | ||
959 | * and some other program tries to do a serial write at the same time. | ||
960 | * Since the lock will only come under contention when the system is | ||
961 | * swapping and available memory is low, it makes sense to share one | ||
962 | * buffer across all the serial ports, since it significantly saves | ||
963 | * memory if large numbers of serial ports are open. | ||
964 | */ | ||
965 | static unsigned char *tmp_buf; | ||
966 | static DEFINE_MUTEX(tmp_buf_mutex); | ||
967 | |||
968 | /* Calculate the chartime depending on baudrate, numbor of bits etc. */ | 955 | /* Calculate the chartime depending on baudrate, numbor of bits etc. */ |
969 | static void update_char_time(struct e100_serial * info) | 956 | static void update_char_time(struct e100_serial * info) |
970 | { | 957 | { |
@@ -3150,7 +3137,7 @@ static int rs_raw_write(struct tty_struct *tty, | |||
3150 | 3137 | ||
3151 | /* first some sanity checks */ | 3138 | /* first some sanity checks */ |
3152 | 3139 | ||
3153 | if (!tty || !info->xmit.buf || !tmp_buf) | 3140 | if (!tty || !info->xmit.buf) |
3154 | return 0; | 3141 | return 0; |
3155 | 3142 | ||
3156 | #ifdef SERIAL_DEBUG_DATA | 3143 | #ifdef SERIAL_DEBUG_DATA |
@@ -4106,7 +4093,6 @@ rs_open(struct tty_struct *tty, struct file * filp) | |||
4106 | { | 4093 | { |
4107 | struct e100_serial *info; | 4094 | struct e100_serial *info; |
4108 | int retval; | 4095 | int retval; |
4109 | unsigned long page; | ||
4110 | int allocated_resources = 0; | 4096 | int allocated_resources = 0; |
4111 | 4097 | ||
4112 | info = rs_table + tty->index; | 4098 | info = rs_table + tty->index; |
@@ -4124,17 +4110,6 @@ rs_open(struct tty_struct *tty, struct file * filp) | |||
4124 | 4110 | ||
4125 | tty->low_latency = !!(info->flags & ASYNC_LOW_LATENCY); | 4111 | tty->low_latency = !!(info->flags & ASYNC_LOW_LATENCY); |
4126 | 4112 | ||
4127 | if (!tmp_buf) { | ||
4128 | page = get_zeroed_page(GFP_KERNEL); | ||
4129 | if (!page) { | ||
4130 | return -ENOMEM; | ||
4131 | } | ||
4132 | if (tmp_buf) | ||
4133 | free_page(page); | ||
4134 | else | ||
4135 | tmp_buf = (unsigned char *) page; | ||
4136 | } | ||
4137 | |||
4138 | /* | 4113 | /* |
4139 | * If the port is in the middle of closing, bail out now | 4114 | * If the port is in the middle of closing, bail out now |
4140 | */ | 4115 | */ |