TTY: tty_io, annotate locking functions
[linux-2.6-block.git] / drivers / tty / tty_io.c
index 3f4ad988543022c3f291ad58d73b246ed8872e6f..6556f7452ba6f960a9f083068f1674164c93ff11 100644 (file)
@@ -962,12 +962,14 @@ static ssize_t tty_read(struct file *file, char __user *buf, size_t count,
 }
 
 void tty_write_unlock(struct tty_struct *tty)
+       __releases(&tty->atomic_write_lock)
 {
        mutex_unlock(&tty->atomic_write_lock);
        wake_up_interruptible_poll(&tty->write_wait, POLLOUT);
 }
 
 int tty_write_lock(struct tty_struct *tty, int ndelay)
+       __acquires(&tty->atomic_write_lock)
 {
        if (!mutex_trylock(&tty->atomic_write_lock)) {
                if (ndelay)