From 9a4c7042e2c9cb3ad993b4c80206d1a01a4f154a Mon Sep 17 00:00:00 2001 From: Zheng Da Date: Wed, 27 Jan 2010 09:25:39 +0100 Subject: Enable the irq after installing irq handler and receiving an interrupt. --- libddekit/interrupt.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'libddekit/interrupt.c') diff --git a/libddekit/interrupt.c b/libddekit/interrupt.c index e41a6a68..f92e36c9 100644 --- a/libddekit/interrupt.c +++ b/libddekit/interrupt.c @@ -103,6 +103,7 @@ static void intloop(void *arg) params->start_err = ret; ddekit_sem_up(params->started); } + device_irq_enable (master_device, params->irq, TRUE); #if 0 /* @@ -140,6 +141,9 @@ static void intloop(void *arg) ddekit_printf ("IRQ %x, handler %p", my_index,params->handler); params->handler(params->priv); + /* If the irq has been disabled by the linux device, + * we don't need to reenable the real one. */ + device_irq_enable (master_device, my_index, TRUE); } else ddekit_printf ("not handling IRQ %x, because it is disabled.", -- cgit v1.2.3