]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
irqchip/uniphier-aidet: Use devm_platform_ioremap_resource()
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Thu, 5 Sep 2019 03:49:32 +0000 (12:49 +0900)
committerMarc Zyngier <maz@kernel.org>
Thu, 5 Sep 2019 08:28:13 +0000 (09:28 +0100)
Replace the chain of platform_get_resource() and devm_ioremap_resource()
with devm_platform_ioremap_resource().

This allows to remove the local variable for (struct resource *), and
have one function call less.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20190905034932.12587-1-yamada.masahiro@socionext.com
drivers/irqchip/irq-uniphier-aidet.c

index ed7b4f47ff3f7088304bb264d92f5a672667666f..89121b39be2692de3bc952bd609c07ddd7fd6508 100644 (file)
@@ -166,7 +166,6 @@ static int uniphier_aidet_probe(struct platform_device *pdev)
        struct device_node *parent_np;
        struct irq_domain *parent_domain;
        struct uniphier_aidet_priv *priv;
-       struct resource *res;
 
        parent_np = of_irq_find_parent(dev->of_node);
        if (!parent_np)
@@ -181,8 +180,7 @@ static int uniphier_aidet_probe(struct platform_device *pdev)
        if (!priv)
                return -ENOMEM;
 
-       res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-       priv->reg_base = devm_ioremap_resource(dev, res);
+       priv->reg_base = devm_platform_ioremap_resource(pdev, 0);
        if (IS_ERR(priv->reg_base))
                return PTR_ERR(priv->reg_base);