Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
[pandora-kernel.git] / arch / arm / plat-mxc / irq-common.c
index 96953e2..b6e1145 100644 (file)
 
 int imx_irq_set_priority(unsigned char irq, unsigned char prio)
 {
-       struct mxc_irq_chip *chip;
-       struct irq_chip *base;
+       struct irq_chip_generic *gc;
+       struct mxc_extra_irq *exirq;
        int ret;
 
        ret = -ENOSYS;
 
-       base = irq_get_chip(irq);
-       if (base) {
-               chip = container_of(base, struct mxc_irq_chip, base);
-               if (chip->set_priority)
-                       ret = chip->set_priority(irq, prio);
+       gc = irq_get_chip_data(irq);
+       if (gc && gc->private) {
+               exirq = gc->private;
+               if (exirq->set_priority)
+                       ret = exirq->set_priority(irq, prio);
        }
 
        return ret;
@@ -43,15 +43,16 @@ EXPORT_SYMBOL(imx_irq_set_priority);
 int mxc_set_irq_fiq(unsigned int irq, unsigned int type)
 {
        struct irq_chip_generic *gc;
-       int (*set_irq_fiq)(unsigned int, unsigned int);
+       struct mxc_extra_irq *exirq;
        int ret;
 
        ret = -ENOSYS;
 
        gc = irq_get_chip_data(irq);
        if (gc && gc->private) {
-               set_irq_fiq = gc->private;
-               ret = set_irq_fiq(irq, type);
+               exirq = gc->private;
+               if (exirq->set_irq_fiq)
+                       ret = exirq->set_irq_fiq(irq, type);
        }
 
        return ret;