aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/hvc_console.h
diff options
context:
space:
mode:
authorHendrik Brueckner <brueckner@linux.vnet.ibm.com>2008-10-13 19:12:48 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2008-10-21 19:59:54 -0400
commitfc362e2e0efd8b652ebfb409a4e43e6189c04f6f (patch)
tree9cffc84bcc4e615ee08f0f47ff58a7131b55194a /drivers/char/hvc_console.h
parenta02efb906d12c9d4eb2ab7c59049ba9545e5412d (diff)
hvc_console: Add a hangup notifier for backends
I have added a hangup notifier that can be used by hvc console backends to handle a tty hangup. The default irq hangup notifier calls the notifier_del_irq() for compatibility. Acked-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'drivers/char/hvc_console.h')
-rw-r--r--drivers/char/hvc_console.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/char/hvc_console.h b/drivers/char/hvc_console.h
index 9790201718ae..ec0e9bb0e5e6 100644
--- a/drivers/char/hvc_console.h
+++ b/drivers/char/hvc_console.h
@@ -65,9 +65,10 @@ struct hv_ops {
65 int (*get_chars)(uint32_t vtermno, char *buf, int count); 65 int (*get_chars)(uint32_t vtermno, char *buf, int count);
66 int (*put_chars)(uint32_t vtermno, const char *buf, int count); 66 int (*put_chars)(uint32_t vtermno, const char *buf, int count);
67 67
68 /* Callbacks for notification. Called in open and close */ 68 /* Callbacks for notification. Called in open, close and hangup */
69 int (*notifier_add)(struct hvc_struct *hp, int irq); 69 int (*notifier_add)(struct hvc_struct *hp, int irq);
70 void (*notifier_del)(struct hvc_struct *hp, int irq); 70 void (*notifier_del)(struct hvc_struct *hp, int irq);
71 void (*notifier_hangup)(struct hvc_struct *hp, int irq);
71}; 72};
72 73
73/* Register a vterm and a slot index for use as a console (console_init) */ 74/* Register a vterm and a slot index for use as a console (console_init) */
@@ -86,6 +87,7 @@ void hvc_kick(void);
86/* default notifier for irq based notification */ 87/* default notifier for irq based notification */
87extern int notifier_add_irq(struct hvc_struct *hp, int data); 88extern int notifier_add_irq(struct hvc_struct *hp, int data);
88extern void notifier_del_irq(struct hvc_struct *hp, int data); 89extern void notifier_del_irq(struct hvc_struct *hp, int data);
90extern void notifier_hangup_irq(struct hvc_struct *hp, int data);
89 91
90 92
91#if defined(CONFIG_XMON) && defined(CONFIG_SMP) 93#if defined(CONFIG_XMON) && defined(CONFIG_SMP)