]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/proc/proc_tty.c
proc: cleanup: use seq_release_private() where appropriate
[linux-2.6-omap-h63xx.git] / fs / proc / proc_tty.c
index c1bbfbeb035e4e5b72a9eb64a1bdb507496b93ce..b3a473b0a191a41d9b27fab13b9990fdc7c9463f 100644 (file)
@@ -108,6 +108,8 @@ static void *t_start(struct seq_file *m, loff_t *pos)
 {
        struct list_head *p;
        loff_t l = *pos;
+
+       mutex_lock(&tty_mutex);
        list_for_each(p, &tty_drivers)
                if (!l--)
                        return list_entry(p, struct tty_driver, tty_drivers);
@@ -124,6 +126,7 @@ static void *t_next(struct seq_file *m, void *v, loff_t *pos)
 
 static void t_stop(struct seq_file *m, void *v)
 {
+       mutex_unlock(&tty_mutex);
 }
 
 static struct seq_operations tty_drivers_op = {