diff options
author | Mark Hounschell <markh@compro.net> | 2014-03-04 16:03:08 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-03-06 14:14:37 -0800 |
commit | a9072fe0569fd25fe924d0d2c577d4ff11158d43 (patch) | |
tree | 5453a850b77a2c2fe59b3a596411249445da6780 /drivers/staging/dgap | |
parent | 54794d196b7b1d89dd933ab6d745f1870a0daa2d (diff) | |
download | blackbird-obmc-linux-a9072fe0569fd25fe924d0d2c577d4ff11158d43.tar.gz blackbird-obmc-linux-a9072fe0569fd25fe924d0d2c577d4ff11158d43.zip |
staging: dgap: remove unnecessary dgap_global_lock
dgap_global_lock is no longer required. This patch
removes it.
Signed-off-by: Mark Hounschell <markh@compro.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/dgap')
-rw-r--r-- | drivers/staging/dgap/dgap.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/drivers/staging/dgap/dgap.c b/drivers/staging/dgap/dgap.c index 85f85eb166e1..c53bdb594f97 100644 --- a/drivers/staging/dgap/dgap.c +++ b/drivers/staging/dgap/dgap.c @@ -240,7 +240,6 @@ static const struct file_operations DgapBoardFops = { */ static uint dgap_NumBoards; static struct board_t *dgap_Board[MAXBOARDS]; -DEFINE_SPINLOCK(dgap_global_lock); static ulong dgap_poll_counter; static char *dgap_config_buf; static int dgap_driver_state = DRIVER_INITIALIZED; @@ -1264,10 +1263,6 @@ static int dgap_ms_sleep(ulong ms) */ static int dgap_tty_preinit(void) { - unsigned long flags; - - DGAP_LOCK(dgap_global_lock, flags); - /* * Allocate a buffer for doing the copy from user space to * kernel space in dgap_input(). We only use one buffer and @@ -1276,12 +1271,9 @@ static int dgap_tty_preinit(void) */ dgap_TmpWriteBuf = kmalloc(WRITEBUFLEN, GFP_ATOMIC); - if (!dgap_TmpWriteBuf) { - DGAP_UNLOCK(dgap_global_lock, flags); + if (!dgap_TmpWriteBuf) return -ENOMEM; - } - DGAP_UNLOCK(dgap_global_lock, flags); return 0; } |