net: Remove NO_IRQ from powerpc-only network drivers
authorMichael Ellerman <mpe@ellerman.id.au>
Sat, 10 Sep 2016 09:59:05 +0000 (19:59 +1000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 13 Sep 2016 15:40:51 +0000 (11:40 -0400)
We'd like to eventually remove NO_IRQ on powerpc, so remove usages of it
from powerpc-only drivers.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/freescale/fman/fman_mac.h
drivers/net/ethernet/freescale/fs_enet/mac-fcc.c
drivers/net/ethernet/freescale/fs_enet/mac-fec.c
drivers/net/ethernet/freescale/fs_enet/mac-scc.c
drivers/net/ethernet/ibm/emac/core.c
drivers/net/ethernet/ibm/emac/mal.c
drivers/net/ethernet/ibm/ibmvnic.c
drivers/net/ethernet/toshiba/ps3_gelic_net.c

index 8ddeedbcef9ce465277f8b8013b797f75ac97c13..ddf0260176c95d609f111bb635c2d3bb3c11506b 100644 (file)
@@ -192,7 +192,7 @@ struct fman_mac_params {
        /* A handle to the FM object this port related to */
        void *fm;
        /* MDIO exceptions interrupt source - not valid for all
-        * MACs; MUST be set to 'NO_IRQ' for MACs that don't have
+        * MACs; MUST be set to 0 for MACs that don't have
         * mdio-irq, or for polling
         */
        void *dev_id; /* device cookie used by the exception cbs */
index 7919896a9a4e0b32df5198216e0950295f9aa97c..120c758f5d018cf0d0331749ad6e3cacec66f6c0 100644 (file)
@@ -90,7 +90,7 @@ static int do_pd_setup(struct fs_enet_private *fep)
        int ret = -EINVAL;
 
        fep->interrupt = irq_of_parse_and_map(ofdev->dev.of_node, 0);
-       if (fep->interrupt == NO_IRQ)
+       if (!fep->interrupt)
                goto out;
 
        fep->fcc.fccp = of_iomap(ofdev->dev.of_node, 0);
index 21fbaaf3a5fce3bef9047c5b5b86528d7e457926..777beffa1e1e900d0b6e87fde3742cfa921ea83e 100644 (file)
@@ -99,7 +99,7 @@ static int do_pd_setup(struct fs_enet_private *fep)
        struct platform_device *ofdev = to_platform_device(fep->dev);
 
        fep->interrupt = irq_of_parse_and_map(ofdev->dev.of_node, 0);
-       if (fep->interrupt == NO_IRQ)
+       if (!fep->interrupt)
                return -EINVAL;
 
        fep->fec.fecp = of_iomap(ofdev->dev.of_node, 0);
index 9d52e1ec005244f66ab793e62480347f63bb062f..15abd37d70e3a587dc603947303ed9ce262d0027 100644 (file)
@@ -99,7 +99,7 @@ static int do_pd_setup(struct fs_enet_private *fep)
        struct platform_device *ofdev = to_platform_device(fep->dev);
 
        fep->interrupt = irq_of_parse_and_map(ofdev->dev.of_node, 0);
-       if (fep->interrupt == NO_IRQ)
+       if (!fep->interrupt)
                return -EINVAL;
 
        fep->scc.sccp = of_iomap(ofdev->dev.of_node, 0);
index 4c9771d57d6e7fce3a77e093e467fe2d0342243e..ec4d0f3b78506351d02d9aac646a86d82da862fe 100644 (file)
@@ -2750,7 +2750,7 @@ static int emac_probe(struct platform_device *ofdev)
        /* Get interrupts. EMAC irq is mandatory, WOL irq is optional */
        dev->emac_irq = irq_of_parse_and_map(np, 0);
        dev->wol_irq = irq_of_parse_and_map(np, 1);
-       if (dev->emac_irq == NO_IRQ) {
+       if (!dev->emac_irq) {
                printk(KERN_ERR "%s: Can't map main interrupt\n", np->full_name);
                goto err_free;
        }
@@ -2913,9 +2913,9 @@ static int emac_probe(struct platform_device *ofdev)
  err_reg_unmap:
        iounmap(dev->emacp);
  err_irq_unmap:
-       if (dev->wol_irq != NO_IRQ)
+       if (dev->wol_irq)
                irq_dispose_mapping(dev->wol_irq);
-       if (dev->emac_irq != NO_IRQ)
+       if (dev->emac_irq)
                irq_dispose_mapping(dev->emac_irq);
  err_free:
        free_netdev(ndev);
@@ -2957,9 +2957,9 @@ static int emac_remove(struct platform_device *ofdev)
        emac_dbg_unregister(dev);
        iounmap(dev->emacp);
 
-       if (dev->wol_irq != NO_IRQ)
+       if (dev->wol_irq)
                irq_dispose_mapping(dev->wol_irq);
-       if (dev->emac_irq != NO_IRQ)
+       if (dev->emac_irq)
                irq_dispose_mapping(dev->emac_irq);
 
        free_netdev(dev->ndev);
index fdb5cdb3cd15322ed226827b73052beac92c5173..aaf6fec566b5175a834c74cee494ebcf13e1c10c 100644 (file)
@@ -597,9 +597,8 @@ static int mal_probe(struct platform_device *ofdev)
                mal->rxde_irq = irq_of_parse_and_map(ofdev->dev.of_node, 4);
        }
 
-       if (mal->txeob_irq == NO_IRQ || mal->rxeob_irq == NO_IRQ ||
-           mal->serr_irq == NO_IRQ || mal->txde_irq == NO_IRQ ||
-           mal->rxde_irq == NO_IRQ) {
+       if (!mal->txeob_irq || !mal->rxeob_irq || !mal->serr_irq ||
+           !mal->txde_irq  || !mal->rxde_irq) {
                printk(KERN_ERR
                       "mal%d: failed to map interrupts !\n", index);
                err = -ENODEV;
index 62454d7a062a98254440ad909ef2887b322367af..bfe17d9c022df9ac8932c1cef9e4eac94cf23d77 100644 (file)
@@ -1424,7 +1424,7 @@ static int init_sub_crq_irqs(struct ibmvnic_adapter *adapter)
                scrq = adapter->tx_scrq[i];
                scrq->irq = irq_create_mapping(NULL, scrq->hw_irq);
 
-               if (scrq->irq == NO_IRQ) {
+               if (!scrq->irq) {
                        rc = -EINVAL;
                        dev_err(dev, "Error mapping irq\n");
                        goto req_tx_irq_failed;
@@ -1444,7 +1444,7 @@ static int init_sub_crq_irqs(struct ibmvnic_adapter *adapter)
        for (i = 0; i < adapter->req_rx_queues; i++) {
                scrq = adapter->rx_scrq[i];
                scrq->irq = irq_create_mapping(NULL, scrq->hw_irq);
-               if (scrq->irq == NO_IRQ) {
+               if (!scrq->irq) {
                        rc = -EINVAL;
                        dev_err(dev, "Error mapping irq\n");
                        goto req_rx_irq_failed;
index 79f0ec4e51ace27929ea5fb6fa3c7438483b9c28..bc258d7e41df381fab85199c8de613b71a382bab 100644 (file)
@@ -1791,7 +1791,7 @@ fail_alloc_rx:
        gelic_card_free_chain(card, card->tx_chain.head);
 fail_alloc_tx:
        free_irq(card->irq, card);
-       netdev->irq = NO_IRQ;
+       netdev->irq = 0;
 fail_request_irq:
        ps3_sb_event_receive_port_destroy(dev, card->irq);
 fail_alloc_irq:
@@ -1843,7 +1843,7 @@ static int ps3_gelic_driver_remove(struct ps3_system_bus_device *dev)
        netdev0 = card->netdev[GELIC_PORT_ETHERNET_0];
        /* disconnect event port */
        free_irq(card->irq, card);
-       netdev0->irq = NO_IRQ;
+       netdev0->irq = 0;
        ps3_sb_event_receive_port_destroy(card->dev, card->irq);
 
        wait_event(card->waitq,