aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/hvc_console.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/hvc_console.c')
-rw-r--r--drivers/char/hvc_console.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/char/hvc_console.c b/drivers/char/hvc_console.c
index fd64137b1ab9..bf70450a49cc 100644
--- a/drivers/char/hvc_console.c
+++ b/drivers/char/hvc_console.c
@@ -367,13 +367,13 @@ static void hvc_close(struct tty_struct *tty, struct file * filp)
367 spin_lock_irqsave(&hp->lock, flags); 367 spin_lock_irqsave(&hp->lock, flags);
368 368
369 if (--hp->count == 0) { 369 if (--hp->count == 0) {
370 if (hp->ops->notifier_del)
371 hp->ops->notifier_del(hp, hp->data);
372
373 /* We are done with the tty pointer now. */ 370 /* We are done with the tty pointer now. */
374 hp->tty = NULL; 371 hp->tty = NULL;
375 spin_unlock_irqrestore(&hp->lock, flags); 372 spin_unlock_irqrestore(&hp->lock, flags);
376 373
374 if (hp->ops->notifier_del)
375 hp->ops->notifier_del(hp, hp->data);
376
377 /* 377 /*
378 * Chain calls chars_in_buffer() and returns immediately if 378 * Chain calls chars_in_buffer() and returns immediately if
379 * there is no buffered data otherwise sleeps on a wait queue 379 * there is no buffered data otherwise sleeps on a wait queue
@@ -416,11 +416,11 @@ static void hvc_hangup(struct tty_struct *tty)
416 hp->n_outbuf = 0; 416 hp->n_outbuf = 0;
417 hp->tty = NULL; 417 hp->tty = NULL;
418 418
419 spin_unlock_irqrestore(&hp->lock, flags);
420
419 if (hp->ops->notifier_del) 421 if (hp->ops->notifier_del)
420 hp->ops->notifier_del(hp, hp->data); 422 hp->ops->notifier_del(hp, hp->data);
421 423
422 spin_unlock_irqrestore(&hp->lock, flags);
423
424 while(temp_open_count) { 424 while(temp_open_count) {
425 --temp_open_count; 425 --temp_open_count;
426 kref_put(&hp->kref, destroy_hvc_struct); 426 kref_put(&hp->kref, destroy_hvc_struct);
@@ -819,11 +819,11 @@ static int hvc_init(void)
819 hvc_driver = drv; 819 hvc_driver = drv;
820 return 0; 820 return 0;
821 821
822put_tty:
823 put_tty_driver(hvc_driver);
824stop_thread: 822stop_thread:
825 kthread_stop(hvc_task); 823 kthread_stop(hvc_task);
826 hvc_task = NULL; 824 hvc_task = NULL;
825put_tty:
826 put_tty_driver(drv);
827out: 827out:
828 return err; 828 return err;
829} 829}