Skip to content

Commit e89327f

Browse files
masahir0yMarc Zyngier
authored andcommitted
irqchip/uniphier-aidet: Use devm_platform_ioremap_resource()
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 <[email protected]> Signed-off-by: Marc Zyngier <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 711419e commit e89327f

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

drivers/irqchip/irq-uniphier-aidet.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,6 @@ static int uniphier_aidet_probe(struct platform_device *pdev)
166166
struct device_node *parent_np;
167167
struct irq_domain *parent_domain;
168168
struct uniphier_aidet_priv *priv;
169-
struct resource *res;
170169

171170
parent_np = of_irq_find_parent(dev->of_node);
172171
if (!parent_np)
@@ -181,8 +180,7 @@ static int uniphier_aidet_probe(struct platform_device *pdev)
181180
if (!priv)
182181
return -ENOMEM;
183182

184-
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
185-
priv->reg_base = devm_ioremap_resource(dev, res);
183+
priv->reg_base = devm_platform_ioremap_resource(pdev, 0);
186184
if (IS_ERR(priv->reg_base))
187185
return PTR_ERR(priv->reg_base);
188186

0 commit comments

Comments
 (0)