aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/platform_device.h
diff options
context:
space:
mode:
authorDejin Zheng <zhengdejin5@gmail.com>2020-03-24 00:06:08 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-03-24 12:09:38 +0100
commit890cc39a879906b63912482dfc41944579df2dc6 (patch)
tree7d252fd21393f02f3ca6d5f36e8b25f1a8be5a55 /include/linux/platform_device.h
parentMerge 5.6-rc7 into usb-next (diff)
downloadlinux-dev-890cc39a879906b63912482dfc41944579df2dc6.tar.xz
linux-dev-890cc39a879906b63912482dfc41944579df2dc6.zip
drivers: provide devm_platform_get_and_ioremap_resource()
Since commit "drivers: provide devm_platform_ioremap_resource()", it was wrap platform_get_resource() and devm_ioremap_resource() as single helper devm_platform_ioremap_resource(). but now, many drivers still used platform_get_resource() and devm_ioremap_resource() together in the kernel tree. The reason can not be replaced is they still need use the resource variables obtained by platform_get_resource(). so provide this helper. Suggested-by: Geert Uytterhoeven <geert@linux-m68k.org> Suggested-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Dejin Zheng <zhengdejin5@gmail.com> Link: https://lore.kernel.org/r/20200323160612.17277-2-zhengdejin5@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/platform_device.h')
-rw-r--r--include/linux/platform_device.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/platform_device.h b/include/linux/platform_device.h
index 041bfa412aa0..f242f66db19d 100644
--- a/include/linux/platform_device.h
+++ b/include/linux/platform_device.h
@@ -55,6 +55,9 @@ extern struct device *
platform_find_device_by_driver(struct device *start,
const struct device_driver *drv);
extern void __iomem *
+devm_platform_get_and_ioremap_resource(struct platform_device *pdev,
+ unsigned int index, struct resource **res);
+extern void __iomem *
devm_platform_ioremap_resource(struct platform_device *pdev,
unsigned int index);
extern void __iomem *