summaryrefslogtreecommitdiffstats
path: root/include/linux/n_r3964.h
diff options
context:
space:
mode:
authorPeter Hurley <peter@hurleysoftware.com>2015-10-10 16:00:56 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-10-17 21:11:29 -0700
commitaba24888d9af19e0bd1c7e7344fd27841611d7a8 (patch)
tree8a463e798166f2a6938687b3b2c9b32dbf385f1e /include/linux/n_r3964.h
parent9b9ab1b3f0860138681862cf6e4c48be59377ef1 (diff)
downloadlinux-aba24888d9af19e0bd1c7e7344fd27841611d7a8.tar.gz
linux-aba24888d9af19e0bd1c7e7344fd27841611d7a8.tar.bz2
linux-aba24888d9af19e0bd1c7e7344fd27841611d7a8.zip
tty: r3964: Replace/remove bogus tty lock use
The tty lock is strictly for serializing tty lifetime events (open/close/hangup), and not for line discipline serialization. The tty core already provides serialization of concurrent writes to the same tty, and line discipline lifetime management (by ldisc references), so pinning the tty via tty_lock() is unnecessary and counter-productive; remove tty lock use. However, the line discipline is responsible for serializing reads (if required by the line discipline); add read_lock mutex to serialize calls of r3964_read(). Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/n_r3964.h')
-rw-r--r--include/linux/n_r3964.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/linux/n_r3964.h b/include/linux/n_r3964.h
index e9adb4226224..90a803aa42e8 100644
--- a/include/linux/n_r3964.h
+++ b/include/linux/n_r3964.h
@@ -161,8 +161,9 @@ struct r3964_info {
unsigned char last_rx;
unsigned char bcc;
unsigned int blocks_in_rx_queue;
-
-
+
+ struct mutex read_lock; /* serialize r3964_read */
+
struct r3964_client_info *firstClient;
unsigned int state;
unsigned int flags;