net: hns: use platform_get_irq instead of irq_of_parse_and_map
authorKejian Yan <yankejian@huawei.com>
Fri, 3 Jun 2016 02:55:14 +0000 (10:55 +0800)
committerDavid S. Miller <davem@davemloft.net>
Sun, 5 Jun 2016 01:32:40 +0000 (21:32 -0400)
As irq_of_parse_and_map is only used by DT case, it is excepted to use
a uniform interface. So it is used platform_get_irq() instead.

Signed-off-by: Kejian Yan <yankejian@huawei.com>
Signed-off-by: Yisen Zhuang <Yisen.Zhuang@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns/hns_dsaf_rcb.c

index 4ef6d23..3ce2409 100644 (file)
@@ -458,7 +458,6 @@ void hns_rcb_get_cfg(struct rcb_common_cb *rcb_common)
        u32 i;
        u32 ring_num = rcb_common->ring_num;
        int base_irq_idx = hns_rcb_get_base_irq_idx(rcb_common);
-       struct device_node *np = rcb_common->dsaf_dev->dev->of_node;
        struct platform_device *pdev =
                to_platform_device(rcb_common->dsaf_dev->dev);
        bool is_ver1 = AE_IS_VER1(rcb_common->dsaf_dev->dsaf_ver);
@@ -473,10 +472,10 @@ void hns_rcb_get_cfg(struct rcb_common_cb *rcb_common)
                ring_pair_cb->port_id_in_comm =
                        hns_rcb_get_port_in_comm(rcb_common, i);
                ring_pair_cb->virq[HNS_RCB_IRQ_IDX_TX] =
-               is_ver1 ? irq_of_parse_and_map(np, base_irq_idx + i * 2) :
+               is_ver1 ? platform_get_irq(pdev, base_irq_idx + i * 2) :
                          platform_get_irq(pdev, base_irq_idx + i * 3 + 1);
                ring_pair_cb->virq[HNS_RCB_IRQ_IDX_RX] =
-               is_ver1 ? irq_of_parse_and_map(np, base_irq_idx + i * 2 + 1) :
+               is_ver1 ? platform_get_irq(pdev, base_irq_idx + i * 2 + 1) :
                          platform_get_irq(pdev, base_irq_idx + i * 3);
                ring_pair_cb->q.phy_base =
                        RCB_COMM_BASE_TO_RING_BASE(rcb_common->phy_base, i);