aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/hvc_console.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2010-04-11 05:44:30 -0400
committerDavid S. Miller <davem@davemloft.net>2010-04-11 05:44:30 -0400
commit4a1032faac94ebbf647460ae3e06fc21146eb280 (patch)
tree7f31b97beb0406faa1523e619289ad0ab07c9787 /drivers/char/hvc_console.c
parentae4e8d63b5619d4d95f1d2bfa2b836caa6e62d06 (diff)
parent0eddb519b9127c73d53db4bf3ec1d45b13f844d1 (diff)
Merge branch 'master' of /home/davem/src/GIT/linux-2.6/
Diffstat (limited to 'drivers/char/hvc_console.c')
-rw-r--r--drivers/char/hvc_console.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/char/hvc_console.c b/drivers/char/hvc_console.c
index ba55bba151b9..35cca4c7fb18 100644
--- a/drivers/char/hvc_console.c
+++ b/drivers/char/hvc_console.c
@@ -38,6 +38,7 @@
38#include <linux/spinlock.h> 38#include <linux/spinlock.h>
39#include <linux/delay.h> 39#include <linux/delay.h>
40#include <linux/freezer.h> 40#include <linux/freezer.h>
41#include <linux/slab.h>
41 42
42#include <asm/uaccess.h> 43#include <asm/uaccess.h>
43 44
@@ -367,16 +368,12 @@ static void hvc_close(struct tty_struct *tty, struct file * filp)
367 hp = tty->driver_data; 368 hp = tty->driver_data;
368 369
369 spin_lock_irqsave(&hp->lock, flags); 370 spin_lock_irqsave(&hp->lock, flags);
370 tty_kref_get(tty);
371 371
372 if (--hp->count == 0) { 372 if (--hp->count == 0) {
373 /* We are done with the tty pointer now. */ 373 /* We are done with the tty pointer now. */
374 hp->tty = NULL; 374 hp->tty = NULL;
375 spin_unlock_irqrestore(&hp->lock, flags); 375 spin_unlock_irqrestore(&hp->lock, flags);
376 376
377 /* Put the ref obtained in hvc_open() */
378 tty_kref_put(tty);
379
380 if (hp->ops->notifier_del) 377 if (hp->ops->notifier_del)
381 hp->ops->notifier_del(hp, hp->data); 378 hp->ops->notifier_del(hp, hp->data);
382 379