Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 116958
b: refs/heads/master
c: fc362e2
h: refs/heads/master
v: v3
  • Loading branch information
Hendrik Brueckner authored and Benjamin Herrenschmidt committed Oct 21, 2008
1 parent c28cac1 commit a4aba15
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a02efb906d12c9d4eb2ab7c59049ba9545e5412d
refs/heads/master: fc362e2e0efd8b652ebfb409a4e43e6189c04f6f
4 changes: 2 additions & 2 deletions trunk/drivers/char/hvc_console.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 3 additions & 1 deletion trunk/drivers/char/hvc_console.h
Original file line number Diff line number Diff line change
Expand Up @@ -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) */
Expand All @@ -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)
Expand Down
5 changes: 5 additions & 0 deletions trunk/drivers/char/hvc_irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
1 change: 1 addition & 0 deletions trunk/drivers/char/hvc_iseries.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/char/hvc_vio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/char/hvc_xen.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/char/virtio_console.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a4aba15

Please sign in to comment.