summaryrefslogtreecommitdiff
path: root/drivers/irqchip/irq-imx-irqsteer.c
diff options
context:
space:
mode:
authorAnson Huang <anson.huang@nxp.com>2019-04-01 06:21:51 +0000
committerMarc Zyngier <marc.zyngier@arm.com>2019-04-29 15:45:00 +0100
commit358b9d248a026d7d0f5ea21b04480b715da0d425 (patch)
tree131f5f8b2cb198f8afa090d183b138a59e8abdd7 /drivers/irqchip/irq-imx-irqsteer.c
parenta7c90f51d7b10e9c71be991a837d87ddc10dab20 (diff)
downloadlinux-358b9d248a026d7d0f5ea21b04480b715da0d425.tar.gz
irqchip/imx-irqsteer: Use devm_platform_ioremap_resource() to simplify code
Use the new helper devm_platform_ioremap_resource() which wraps the platform_get_resource() and devm_ioremap_resource() together, to simplify the code. Signed-off-by: Anson Huang <Anson.Huang@nxp.com> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Diffstat (limited to 'drivers/irqchip/irq-imx-irqsteer.c')
-rw-r--r--drivers/irqchip/irq-imx-irqsteer.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/irqchip/irq-imx-irqsteer.c b/drivers/irqchip/irq-imx-irqsteer.c
index 88df3d00052c..290531ec3d61 100644
--- a/drivers/irqchip/irq-imx-irqsteer.c
+++ b/drivers/irqchip/irq-imx-irqsteer.c
@@ -144,7 +144,6 @@ static int imx_irqsteer_probe(struct platform_device *pdev)
{
struct device_node *np = pdev->dev.of_node;
struct irqsteer_data *data;
- struct resource *res;
u32 irqs_num;
int i, ret;
@@ -152,8 +151,7 @@ static int imx_irqsteer_probe(struct platform_device *pdev)
if (!data)
return -ENOMEM;
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- data->regs = devm_ioremap_resource(&pdev->dev, res);
+ data->regs = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(data->regs)) {
dev_err(&pdev->dev, "failed to initialize reg\n");
return PTR_ERR(data->regs);