diff --git a/drivers/char/hvc_console.c b/drivers/char/hvc_console.c index bf70450a49ccbc403c62917c53f0db73f7328f5d..5c9750ed0bc2ed674ca1376e551ee69f1911fb20 100644 --- a/drivers/char/hvc_console.c +++ b/drivers/char/hvc_console.c @@ -418,8 +418,8 @@ static void hvc_hangup(struct tty_struct *tty) spin_unlock_irqrestore(&hp->lock, flags); - if (hp->ops->notifier_del) - hp->ops->notifier_del(hp, hp->data); + if (hp->ops->notifier_hangup) + hp->ops->notifier_hangup(hp, hp->data); while(temp_open_count) { --temp_open_count; diff --git a/drivers/char/hvc_console.h b/drivers/char/hvc_console.h index 9790201718ae6ce6892c65d3b10de8d7c102d4d0..ec0e9bb0e5e6482f4d6ecdfb429d4ce169723a2c 100644 --- a/drivers/char/hvc_console.h +++ b/drivers/char/hvc_console.h @@ -65,9 +65,10 @@ struct hv_ops { int (*get_chars)(uint32_t vtermno, char *buf, int count); int (*put_chars)(uint32_t vtermno, const char *buf, int count); - /* Callbacks for notification. Called in open and close */ + /* Callbacks for notification. Called in open, close and hangup */ int (*notifier_add)(struct hvc_struct *hp, int irq); void (*notifier_del)(struct hvc_struct *hp, int irq); + void (*notifier_hangup)(struct hvc_struct *hp, int irq); }; /* Register a vterm and a slot index for use as a console (console_init) */ @@ -86,6 +87,7 @@ void hvc_kick(void); /* default notifier for irq based notification */ extern int notifier_add_irq(struct hvc_struct *hp, int data); extern void notifier_del_irq(struct hvc_struct *hp, int data); +extern void notifier_hangup_irq(struct hvc_struct *hp, int data); #if defined(CONFIG_XMON) && defined(CONFIG_SMP) diff --git a/drivers/char/hvc_irq.c b/drivers/char/hvc_irq.c index 73a59cdb8947c3d8436ee07f6a8d982d8ec91898..d09e5688d4497242d4bcc6dcad23abc1a4f96202 100644 --- a/drivers/char/hvc_irq.c +++ b/drivers/char/hvc_irq.c @@ -42,3 +42,8 @@ void notifier_del_irq(struct hvc_struct *hp, int irq) free_irq(irq, hp); hp->irq_requested = 0; } + +void notifier_hangup_irq(struct hvc_struct *hp, int irq) +{ + notifier_del_irq(hp, irq); +} diff --git a/drivers/char/hvc_iseries.c b/drivers/char/hvc_iseries.c index b71c610fe5ae0584092b8badbc4c9c93fe52f117..b74a2f8ab9080fe995b21c370857d54c7ff3db02 100644 --- a/drivers/char/hvc_iseries.c +++ b/drivers/char/hvc_iseries.c @@ -202,6 +202,7 @@ static struct hv_ops hvc_get_put_ops = { .put_chars = put_chars, .notifier_add = notifier_add_irq, .notifier_del = notifier_del_irq, + .notifier_hangup = notifier_hangup_irq, }; static int __devinit hvc_vio_probe(struct vio_dev *vdev, diff --git a/drivers/char/hvc_vio.c b/drivers/char/hvc_vio.c index 93f3840c1682e53e9f2e20c2f21330ba4a9a71e5..019e0b58593da4f2356ef3725d03cd7f186ed1ad 100644 --- a/drivers/char/hvc_vio.c +++ b/drivers/char/hvc_vio.c @@ -82,6 +82,7 @@ static struct hv_ops hvc_get_put_ops = { .put_chars = hvc_put_chars, .notifier_add = notifier_add_irq, .notifier_del = notifier_del_irq, + .notifier_hangup = notifier_hangup_irq, }; static int __devinit hvc_vio_probe(struct vio_dev *vdev, diff --git a/drivers/char/hvc_xen.c b/drivers/char/hvc_xen.c index 538ceea5e7df364a1f059a482b6cc0adc1d68bc6..eba999f8598d07a8a29fe03bac5bb4de18d39f62 100644 --- a/drivers/char/hvc_xen.c +++ b/drivers/char/hvc_xen.c @@ -102,6 +102,7 @@ static struct hv_ops hvc_ops = { .put_chars = write_console, .notifier_add = notifier_add_irq, .notifier_del = notifier_del_irq, + .notifier_hangup = notifier_hangup_irq, }; static int __init xen_init(void) diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c index d0f4eb6fdb7fee27eca6cfec84ff8cf25af209e4..3fb0d2c88ba5fd3252bf7d773c8ecdaafc9de395 100644 --- a/drivers/char/virtio_console.c +++ b/drivers/char/virtio_console.c @@ -198,6 +198,7 @@ static int __devinit virtcons_probe(struct virtio_device *dev) virtio_cons.put_chars = put_chars; virtio_cons.notifier_add = notifier_add_vio; virtio_cons.notifier_del = notifier_del_vio; + virtio_cons.notifier_hangup = notifier_del_vio; /* The first argument of hvc_alloc() is the virtual console number, so * we use zero. The second argument is the parameter for the