]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
Blackfin arch: Not call generic set_irq_handler() in bfin_gpio_irq_type() due to...
authorGraf Yang <graf.yang@analog.com>
Wed, 8 Oct 2008 10:02:44 +0000 (18:02 +0800)
committerBryan Wu <cooloney@kernel.org>
Wed, 8 Oct 2008 10:02:44 +0000 (18:02 +0800)
Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
arch/blackfin/mach-common/ints-priority.c

index f65b3a13a8c39154454f4959bbcad3383407f356..34e8a726ffda2fd4d8796f83b4cd285264791f77 100644 (file)
@@ -364,6 +364,14 @@ static void bfin_demux_error_irq(unsigned int int_err_irq,
 }
 #endif                         /* BF537_GENERIC_ERROR_INT_DEMUX */
 
+static inline void bfin_set_irq_handler(unsigned irq, irq_flow_handler_t handle)
+{
+       struct irq_desc *desc = irq_desc + irq;
+       /* May not call generic set_irq_handler() due to spinlock
+          recursion. */
+       desc->handle_irq = handle;
+}
+
 #if !defined(CONFIG_BF54x)
 
 static unsigned short gpio_enabled[gpio_bank(MAX_BLACKFIN_GPIOS)];
@@ -476,9 +484,9 @@ static int bfin_gpio_irq_type(unsigned int irq, unsigned int type)
        SSYNC();
 
        if (type & (IRQ_TYPE_EDGE_RISING | IRQ_TYPE_EDGE_FALLING))
-               set_irq_handler(irq, handle_edge_irq);
+               bfin_set_irq_handler(irq, handle_edge_irq);
        else
-               set_irq_handler(irq, handle_level_irq);
+               bfin_set_irq_handler(irq, handle_level_irq);
 
        return 0;
 }
@@ -808,10 +816,10 @@ static int bfin_gpio_irq_type(unsigned int irq, unsigned int type)
 
        if (type & (IRQ_TYPE_EDGE_RISING | IRQ_TYPE_EDGE_FALLING)) {
                pint[bank]->edge_set = pintbit;
-               set_irq_handler(irq, handle_edge_irq);
+               bfin_set_irq_handler(irq, handle_edge_irq);
        } else {
                pint[bank]->edge_clear = pintbit;
-               set_irq_handler(irq, handle_level_irq);
+               bfin_set_irq_handler(irq, handle_level_irq);
        }
 
        SSYNC();