Skip to content

Commit

Permalink
irqchip/irq-mvebu-icu: Make use of the helper function devm_platform_…
Browse files Browse the repository at this point in the history
…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 <[email protected]>
Reviewed-by: Andrew Lunn <[email protected]>
Signed-off-by: Marc Zyngier <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
  • Loading branch information
caihuoqing1990 authored and Marc Zyngier committed Oct 19, 2021
1 parent 9e1ff30 commit 0c1479a
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/irqchip/irq-mvebu-icu.c
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,6 @@ builtin_platform_driver(mvebu_icu_subset_driver);
static int mvebu_icu_probe(struct platform_device *pdev)
{
struct mvebu_icu *icu;
struct resource *res;
int i;

icu = devm_kzalloc(&pdev->dev, sizeof(struct mvebu_icu),
Expand All @@ -357,8 +356,7 @@ static int mvebu_icu_probe(struct platform_device *pdev)

icu->dev = &pdev->dev;

res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
icu->base = devm_ioremap_resource(&pdev->dev, res);
icu->base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(icu->base))
return PTR_ERR(icu->base);

Expand Down

0 comments on commit 0c1479a

Please sign in to comment.