]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - fs/proc/proc_tty.c
[PATCH] sched: remove dead code from task_stime()
[mv-sheeva.git] / fs / proc / proc_tty.c
index 15c4455b09eb33200adcc2c6984123fd7592083d..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 = {
@@ -138,7 +141,7 @@ static int tty_drivers_open(struct inode *inode, struct file *file)
        return seq_open(file, &tty_drivers_op);
 }
 
-static struct file_operations proc_tty_drivers_operations = {
+static const struct file_operations proc_tty_drivers_operations = {
        .open           = tty_drivers_open,
        .read           = seq_read,
        .llseek         = seq_lseek,