mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 14:11:52 +00:00
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
This commit is contained in:
parent
9e1ff307c7
commit
0c1479a663
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user