summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCai Huoqing <caihuoqing@baidu.com>2021-09-08 18:56:52 +0800
committerMarc Zyngier <maz@kernel.org>2021-10-19 11:22:34 +0100
commit0c1479a66359c6955cd973c9e225d7ee5d6c71aa (patch)
tree1dc93010058f18e170105f7f507048a46134a506
parent9e1ff307c779ce1f0f810c7ecce3d95bbae40896 (diff)
downloadlinux-0c1479a66359c6955cd973c9e225d7ee5d6c71aa.tar.gz
linux-0c1479a66359c6955cd973c9e225d7ee5d6c71aa.tar.bz2
linux-0c1479a66359c6955cd973c9e225d7ee5d6c71aa.zip
irqchip/irq-mvebu-icu: 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/20210908105653.1627-1-caihuoqing@baidu.com
-rw-r--r--drivers/irqchip/irq-mvebu-icu.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/irqchip/irq-mvebu-icu.c b/drivers/irqchip/irq-mvebu-icu.c
index 090bc3f4f7d8..3e7297fc5948 100644
--- a/drivers/irqchip/irq-mvebu-icu.c
+++ b/drivers/irqchip/irq-mvebu-icu.c
@@ -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),
@@ -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);