Skip to content

Commit 88f29ab

Browse files
Yang Likwilczynski
authored andcommitted
PCI: v3: Use devm_platform_get_and_ioremap_resource()
Convert calls to platform_get_resource() and devm_ioremap_resource() into a single call to devm_platform_get_and_ioremap_resource(), to simplify the code. This new helper added in commit 890cc39 ("drivers: provide devm_platform_get_and_ioremap_resource()") does what both of the other separate functions do. [kwilczynski: commit log] Link: https://lore.kernel.org/linux-pci/20230323090431.73526-1-yang.lee@linux.alibaba.com Signed-off-by: Yang Li <yang.lee@linux.alibaba.com> Signed-off-by: Krzysztof Wilczyński <kwilczynski@kernel.org> Acked-by: Linus Walleij <linus.walleij@linaro.org>
1 parent da1e327 commit 88f29ab

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/pci/controller/pci-v3-semi.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -736,8 +736,7 @@ static int v3_pci_probe(struct platform_device *pdev)
736736
return ret;
737737
}
738738

739-
regs = platform_get_resource(pdev, IORESOURCE_MEM, 0);
740-
v3->base = devm_ioremap_resource(dev, regs);
739+
v3->base = devm_platform_get_and_ioremap_resource(pdev, 0, &regs);
741740
if (IS_ERR(v3->base))
742741
return PTR_ERR(v3->base);
743742
/*

0 commit comments

Comments
 (0)