projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
drm/rockchip: add rk3399 vop big csc support
[firefly-linux-kernel-4.4.55.git]
/
drivers
/
tty
/
tty_mutex.c
diff --git
a/drivers/tty/tty_mutex.c
b/drivers/tty/tty_mutex.c
index 0efcf713b756e5e7eaf95bf7b5f2a744fc7f6dc0..d09293bc0e041417cc15047f84eec0ccd01298eb 100644
(file)
--- a/
drivers/tty/tty_mutex.c
+++ b/
drivers/tty/tty_mutex.c
@@
-22,6
+22,14
@@
void __lockfunc tty_lock(struct tty_struct *tty)
}
EXPORT_SYMBOL(tty_lock);
}
EXPORT_SYMBOL(tty_lock);
+int tty_lock_interruptible(struct tty_struct *tty)
+{
+ if (WARN(tty->magic != TTY_MAGIC, "L Bad %p\n", tty))
+ return -EIO;
+ tty_kref_get(tty);
+ return mutex_lock_interruptible(&tty->legacy_mutex);
+}
+
void __lockfunc tty_unlock(struct tty_struct *tty)
{
if (tty->magic != TTY_MAGIC) {
void __lockfunc tty_unlock(struct tty_struct *tty)
{
if (tty->magic != TTY_MAGIC) {