[PATCH] HVC: do not request the irq twice.

From: Ian Campbell
Date: Thu Jan 22 2009 - 12:57:47 EST


Otherwise:
root@bogga:~# tty
/dev/hvc0
root@bogga:~# reboot


Broadcast message from root@bogga (hvc0) (Thu Jan 22 17:51:20 2009):

The system is going down for reboot NOW!
INIT: Switching to runlevel: 6
INIT: Sending processes the TERM signal
hvc_open: request_irq failed with rc -16.

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
Cc: Milton Miller <miltonm@xxxxxxx>
Cc: Christian Borntraeger <borntraeger@xxxxxxxxxx>
Cc: Hendrik Brueckner <brueckner@xxxxxxxxxxxxxxxxxx>
Cc: Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx>
Cc: Rusty Russell <rusty@xxxxxxxxxxxxxxx>
---
drivers/char/hvc_irq.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/drivers/char/hvc_irq.c b/drivers/char/hvc_irq.c
index 2623e17..8152a13 100644
--- a/drivers/char/hvc_irq.c
+++ b/drivers/char/hvc_irq.c
@@ -28,6 +28,10 @@ int notifier_add_irq(struct hvc_struct *hp, int irq)
hp->irq_requested = 0;
return 0;
}
+
+ if (hp->irq_requested)
+ return 0;
+
rc = request_irq(irq, hvc_handle_interrupt, IRQF_DISABLED,
"hvc_console", hp);
if (!rc)
--
1.5.6.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/