mirror of
https://github.com/torvalds/linux.git
synced 2024-11-22 20:22:09 +00:00
driver core: platform: Reimplement devm_platform_ioremap_resource
Reimplement devm_platform_ioremap_resource() by calling devm_platform_ioremap_and_get_resource() with res = NULL to simplify the code. Suggested-by: Geert Uytterhoeven <geert@linux-m68k.org> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Dejin Zheng <zhengdejin5@gmail.com> Link: https://lore.kernel.org/r/20200323160612.17277-6-zhengdejin5@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
5bf7e2883f
commit
fd78901c29
@ -95,10 +95,7 @@ EXPORT_SYMBOL_GPL(devm_platform_get_and_ioremap_resource);
|
||||
void __iomem *devm_platform_ioremap_resource(struct platform_device *pdev,
|
||||
unsigned int index)
|
||||
{
|
||||
struct resource *res;
|
||||
|
||||
res = platform_get_resource(pdev, IORESOURCE_MEM, index);
|
||||
return devm_ioremap_resource(&pdev->dev, res);
|
||||
return devm_platform_get_and_ioremap_resource(pdev, index, NULL);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(devm_platform_ioremap_resource);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user