Commit 86a34147d1f1c94e94500e63e83f9fa42548a088

Authored by Paul Fulghum
Committed by Linus Torvalds
1 parent f5f5370da4

[PATCH] synclink: remove dead code

Remove dead code from synclink driver.  This was used previously when the
write method had a from_user flag, which has been removed.

Signed-off-by: Paul Fulghum <paulkf@microgate.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

Showing 1 changed file with 1 additions and 30 deletions Side-by-side Diff

drivers/char/synclink.c
... ... @@ -941,17 +941,6 @@
941 941 return mgsl_get_text_ptr;
942 942 }
943 943  
944   -/*
945   - * tmp_buf is used as a temporary buffer by mgsl_write. We need to
946   - * lock it in case the COPY_FROM_USER blocks while swapping in a page,
947   - * and some other program tries to do a serial write at the same time.
948   - * Since the lock will only come under contention when the system is
949   - * swapping and available memory is low, it makes sense to share one
950   - * buffer across all the serial ioports, since it significantly saves
951   - * memory if large numbers of serial ports are open.
952   - */
953   -static unsigned char *tmp_buf;
954   -
955 944 static inline int mgsl_paranoia_check(struct mgsl_struct *info,
956 945 char *name, const char *routine)
957 946 {
... ... @@ -2150,7 +2139,7 @@
2150 2139 if (mgsl_paranoia_check(info, tty->name, "mgsl_write"))
2151 2140 goto cleanup;
2152 2141  
2153   - if (!tty || !info->xmit_buf || !tmp_buf)
  2142 + if (!tty || !info->xmit_buf)
2154 2143 goto cleanup;
2155 2144  
2156 2145 if ( info->params.mode == MGSL_MODE_HDLC ||
... ... @@ -3438,7 +3427,6 @@
3438 3427 {
3439 3428 struct mgsl_struct *info;
3440 3429 int retval, line;
3441   - unsigned long page;
3442 3430 unsigned long flags;
3443 3431  
3444 3432 /* verify range of specified line number */
... ... @@ -3472,18 +3460,6 @@
3472 3460 goto cleanup;
3473 3461 }
3474 3462  
3475   - if (!tmp_buf) {
3476   - page = get_zeroed_page(GFP_KERNEL);
3477   - if (!page) {
3478   - retval = -ENOMEM;
3479   - goto cleanup;
3480   - }
3481   - if (tmp_buf)
3482   - free_page(page);
3483   - else
3484   - tmp_buf = (unsigned char *) page;
3485   - }
3486   -
3487 3463 info->tty->low_latency = (info->flags & ASYNC_LOW_LATENCY) ? 1 : 0;
3488 3464  
3489 3465 spin_lock_irqsave(&info->netlock, flags);
... ... @@ -4500,11 +4476,6 @@
4500 4476 tmp = info;
4501 4477 info = info->next_device;
4502 4478 kfree(tmp);
4503   - }
4504   -
4505   - if (tmp_buf) {
4506   - free_page((unsigned long) tmp_buf);
4507   - tmp_buf = NULL;
4508 4479 }
4509 4480  
4510 4481 if (pci_registered)