]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - arch/powerpc/sysdev/mpic.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
[karo-tx-linux.git] / arch / powerpc / sysdev / mpic.c
index 7de45b2df36699abf7cb4ce98e710aba0bce2ab3..b9aac951a90f69ec3e05775fe50495b25fea6716 100644 (file)
@@ -1249,7 +1249,7 @@ struct mpic * __init mpic_alloc(struct device_node *node,
        /* Pick the physical address from the device tree if unspecified */
        if (!phys_addr) {
                /* Check if it is DCR-based */
-               if (of_get_property(node, "dcr-reg", NULL)) {
+               if (of_property_read_bool(node, "dcr-reg")) {
                        flags |= MPIC_USES_DCR;
                } else {
                        struct resource r;
@@ -1649,7 +1649,7 @@ void __init mpic_init(struct mpic *mpic)
        /* Check if this MPIC is chained from a parent interrupt controller */
        if (mpic->flags & MPIC_SECONDARY) {
                int virq = irq_of_parse_and_map(mpic->node, 0);
-               if (virq != NO_IRQ) {
+               if (virq) {
                        printk(KERN_INFO "%s: hooking up to IRQ %d\n",
                                        mpic->node->full_name, virq);
                        irq_set_handler_data(virq, mpic);
@@ -1778,13 +1778,13 @@ static unsigned int _mpic_get_one_irq(struct mpic *mpic, int reg)
        if (unlikely(src == mpic->spurious_vec)) {
                if (mpic->flags & MPIC_SPV_EOI)
                        mpic_eoi(mpic);
-               return NO_IRQ;
+               return 0;
        }
        if (unlikely(mpic->protected && test_bit(src, mpic->protected))) {
                printk_ratelimited(KERN_WARNING "%s: Got protected source %d !\n",
                                   mpic->name, (int)src);
                mpic_eoi(mpic);
-               return NO_IRQ;
+               return 0;
        }
 
        return irq_linear_revmap(mpic->irqhost, src);
@@ -1817,17 +1817,17 @@ unsigned int mpic_get_coreint_irq(void)
        if (unlikely(src == mpic->spurious_vec)) {
                if (mpic->flags & MPIC_SPV_EOI)
                        mpic_eoi(mpic);
-               return NO_IRQ;
+               return 0;
        }
        if (unlikely(mpic->protected && test_bit(src, mpic->protected))) {
                printk_ratelimited(KERN_WARNING "%s: Got protected source %d !\n",
                                   mpic->name, (int)src);
-               return NO_IRQ;
+               return 0;
        }
 
        return irq_linear_revmap(mpic->irqhost, src);
 #else
-       return NO_IRQ;
+       return 0;
 #endif
 }
 
@@ -1852,7 +1852,7 @@ void mpic_request_ipis(void)
        for (i = 0; i < 4; i++) {
                unsigned int vipi = irq_create_mapping(mpic->irqhost,
                                                       mpic->ipi_vecs[0] + i);
-               if (vipi == NO_IRQ) {
+               if (!vipi) {
                        printk(KERN_ERR "Failed to map %s\n", smp_ipi_name[i]);
                        continue;
                }