summaryrefslogtreecommitdiff
path: root/drivers/irqchip/irq-mvebu-pic.c
diff options
context:
space:
mode:
authorCai Huoqing <caihuoqing@baidu.com>2021-09-08 18:57:00 +0800
committerMarc Zyngier <maz@kernel.org>2021-10-19 11:22:59 +0100
commitbacdbd710de553c9c998235231139f0921a5750c (patch)
tree9ca4cdf88b978852404c9ff5f21e6aec9caaa798 /drivers/irqchip/irq-mvebu-pic.c
parent0c1479a66359c6955cd973c9e225d7ee5d6c71aa (diff)
irqchip/irq-mvebu-pic: Make use of the helper function devm_platform_ioremap_resource()
Use the devm_platform_ioremap_resource() helper instead of calling platform_get_resource() and devm_ioremap_resource() separately Signed-off-by: Cai Huoqing <caihuoqing@baidu.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Marc Zyngier <maz@kernel.org> Link: https://lore.kernel.org/r/20210908105701.1678-1-caihuoqing@baidu.com
Diffstat (limited to 'drivers/irqchip/irq-mvebu-pic.c')
-rw-r--r--drivers/irqchip/irq-mvebu-pic.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/irqchip/irq-mvebu-pic.c b/drivers/irqchip/irq-mvebu-pic.c
index dc1cee4b0fe1..870f9866b8da 100644
--- a/drivers/irqchip/irq-mvebu-pic.c
+++ b/drivers/irqchip/irq-mvebu-pic.c
@@ -121,14 +121,12 @@ static int mvebu_pic_probe(struct platform_device *pdev)
struct device_node *node = pdev->dev.of_node;
struct mvebu_pic *pic;
struct irq_chip *irq_chip;
- struct resource *res;
pic = devm_kzalloc(&pdev->dev, sizeof(struct mvebu_pic), GFP_KERNEL);
if (!pic)
return -ENOMEM;
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- pic->base = devm_ioremap_resource(&pdev->dev, res);
+ pic->base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(pic->base))
return PTR_ERR(pic->base);