summaryrefslogtreecommitdiff
path: root/drivers/staging/dgnc/dgnc_tty.c
diff options
context:
space:
mode:
authorPankaj Bharadiya <pankaj.bharadiya@gmail.com>2016-10-17 16:17:07 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-10-25 09:40:37 +0200
commit02782a1963c97ae04e644592fbad3c3f2b365728 (patch)
treedde7027cb21b2157e2d399efdbf5004c5c709ba3 /drivers/staging/dgnc/dgnc_tty.c
parent49b9137a6002a06f7e44e59ece9b34fd1e4fca4c (diff)
staging: dgnc: Remove some redundant functions
dgnc_tty_preinit() and dgnc_tty_post_uninit() functions are used to allocate and free "dgnc_TmpWriteBuf" and this "dgnc_TmpWriteBuf" is not really getting used. Hence remove these redundant functions. Also remove dgnc_TmpWriteBuf variable as it is not used anymore. Signed-off-by: Pankaj Bharadiya <pankaj.bharadiya@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/dgnc/dgnc_tty.c')
-rw-r--r--drivers/staging/dgnc/dgnc_tty.c45
1 files changed, 2 insertions, 43 deletions
diff --git a/drivers/staging/dgnc/dgnc_tty.c b/drivers/staging/dgnc/dgnc_tty.c
index cf8aefdc9534..5fb2fefcdaa3 100644
--- a/drivers/staging/dgnc/dgnc_tty.c
+++ b/drivers/staging/dgnc/dgnc_tty.c
@@ -43,11 +43,6 @@
#include "dgnc_utils.h"
/*
- * internal variables
- */
-static unsigned char *dgnc_TmpWriteBuf;
-
-/*
* Default transparent print information.
*/
static const struct digi_t dgnc_digi_init = {
@@ -144,31 +139,6 @@ static const struct tty_operations dgnc_tty_ops = {
************************************************************************/
/*
- * dgnc_tty_preinit()
- *
- * Initialize any global tty related data before we download any boards.
- */
-int dgnc_tty_preinit(void)
-{
- /*
- * Allocate a buffer for doing the copy from user space to
- * kernel space in dgnc_write(). We only use one buffer and
- * control access to it with a semaphore. If we are paging, we
- * are already in trouble so one buffer won't hurt much anyway.
- *
- * We are okay to sleep in the malloc, as this routine
- * is only called during module load, (not in interrupt context),
- * and with no locks held.
- */
- dgnc_TmpWriteBuf = kmalloc(WRITEBUFLEN, GFP_KERNEL);
-
- if (!dgnc_TmpWriteBuf)
- return -ENOMEM;
-
- return 0;
-}
-
-/*
* dgnc_tty_register()
*
* Init the tty subsystem for this board.
@@ -365,17 +335,6 @@ err_free_channels:
}
/*
- * dgnc_tty_post_uninit()
- *
- * UnInitialize any global tty related data.
- */
-void dgnc_tty_post_uninit(void)
-{
- kfree(dgnc_TmpWriteBuf);
- dgnc_TmpWriteBuf = NULL;
-}
-
-/*
* dgnc_cleanup_tty()
*
* Uninitialize the TTY portion of this driver. Free all memory and
@@ -1543,7 +1502,7 @@ static int dgnc_tty_write_room(struct tty_struct *tty)
int ret = 0;
unsigned long flags;
- if (!tty || !dgnc_TmpWriteBuf)
+ if (!tty)
return 0;
un = tty->driver_data;
@@ -1623,7 +1582,7 @@ static int dgnc_tty_write(struct tty_struct *tty,
ushort tmask;
uint remain;
- if (!tty || !dgnc_TmpWriteBuf)
+ if (!tty)
return 0;
un = tty->driver_data;