summaryrefslogtreecommitdiff
path: root/libddekit/interrupt.c
diff options
context:
space:
mode:
authorZheng Da <zhengda1936@gmail.com>2010-01-27 09:25:39 +0100
committerZheng Da <zhengda1936@gmail.com>2010-01-27 09:25:39 +0100
commit9a4c7042e2c9cb3ad993b4c80206d1a01a4f154a (patch)
treec0d65cf79bd45cdccd77afdd8ec87b5c85731946 /libddekit/interrupt.c
parent38471feb4f5f5127290d28fc97cb1f54f96a0ffe (diff)
Enable the irq after installing irq handler and receiving an interrupt.
Diffstat (limited to 'libddekit/interrupt.c')
-rw-r--r--libddekit/interrupt.c4
1 files changed, 4 insertions, 0 deletions
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.",