aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/tty_io.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/tty_io.c')
-rw-r--r--drivers/char/tty_io.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c
index 7053d6333692..59f472143f08 100644
--- a/drivers/char/tty_io.c
+++ b/drivers/char/tty_io.c
@@ -2850,7 +2850,7 @@ struct device *tty_register_device(struct tty_driver *driver, unsigned index,
2850 else 2850 else
2851 tty_line_name(driver, index, name); 2851 tty_line_name(driver, index, name);
2852 2852
2853 return device_create_drvdata(tty_class, device, dev, NULL, name); 2853 return device_create(tty_class, device, dev, NULL, name);
2854} 2854}
2855EXPORT_SYMBOL(tty_register_device); 2855EXPORT_SYMBOL(tty_register_device);
2856 2856
@@ -3032,11 +3032,12 @@ EXPORT_SYMBOL(tty_devnum);
3032 3032
3033void proc_clear_tty(struct task_struct *p) 3033void proc_clear_tty(struct task_struct *p)
3034{ 3034{
3035 unsigned long flags;
3035 struct tty_struct *tty; 3036 struct tty_struct *tty;
3036 spin_lock_irq(&p->sighand->siglock); 3037 spin_lock_irqsave(&p->sighand->siglock, flags);
3037 tty = p->signal->tty; 3038 tty = p->signal->tty;
3038 p->signal->tty = NULL; 3039 p->signal->tty = NULL;
3039 spin_unlock_irq(&p->sighand->siglock); 3040 spin_unlock_irqrestore(&p->sighand->siglock, flags);
3040 tty_kref_put(tty); 3041 tty_kref_put(tty);
3041} 3042}
3042 3043