From 7944cb6307ffe6f59a19116a57037aba707775a8 Mon Sep 17 00:00:00 2001 From: Christian Borntraeger Date: Sun, 12 Oct 2008 21:51:31 +0000 Subject: [PATCH] --- yaml --- r: 114654 b: refs/heads/master c: eef2622a9fcfa964073333ea72c7c9cd20ad45e6 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/char/hvc_console.c | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/[refs] b/[refs] index 56ef020614ae..8d87c7123cb3 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: f5ea64dcbad89875d130596df14c9b25d994a737 +refs/heads/master: eef2622a9fcfa964073333ea72c7c9cd20ad45e6 diff --git a/trunk/drivers/char/hvc_console.c b/trunk/drivers/char/hvc_console.c index fd64137b1ab9..f2e4caf70599 100644 --- a/trunk/drivers/char/hvc_console.c +++ b/trunk/drivers/char/hvc_console.c @@ -367,13 +367,13 @@ static void hvc_close(struct tty_struct *tty, struct file * filp) spin_lock_irqsave(&hp->lock, flags); if (--hp->count == 0) { - if (hp->ops->notifier_del) - hp->ops->notifier_del(hp, hp->data); - /* We are done with the tty pointer now. */ hp->tty = NULL; spin_unlock_irqrestore(&hp->lock, flags); + if (hp->ops->notifier_del) + hp->ops->notifier_del(hp, hp->data); + /* * Chain calls chars_in_buffer() and returns immediately if * there is no buffered data otherwise sleeps on a wait queue @@ -416,11 +416,11 @@ static void hvc_hangup(struct tty_struct *tty) hp->n_outbuf = 0; hp->tty = NULL; + spin_unlock_irqrestore(&hp->lock, flags); + if (hp->ops->notifier_del) hp->ops->notifier_del(hp, hp->data); - spin_unlock_irqrestore(&hp->lock, flags); - while(temp_open_count) { --temp_open_count; kref_put(&hp->kref, destroy_hvc_struct);