summaryrefslogtreecommitdiff
path: root/include/linux/platform_device.h
diff options
context:
space:
mode:
authorBartosz Golaszewski <bgolaszewski@baylibre.com>2019-10-22 11:43:16 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-11-05 20:33:13 +0300
commitc9c8641d3ebd79274af75f7df3e6a9c6cc8a66e9 (patch)
treed14690c74beef6a0d8a9a4e15700791abee97b0f /include/linux/platform_device.h
parent444b0111f3bc8f3b2bc83dc15f85123034a79bc2 (diff)
downloadlinux-c9c8641d3ebd79274af75f7df3e6a9c6cc8a66e9.tar.xz
drivers: provide devm_platform_ioremap_resource_byname()
Provide a variant of devm_platform_ioremap_resource() that allows to lookup resources from platform devices by name rather than by index. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com> Reviewed-by: Arnd Bergmann <arnd@arndb.de> Link: https://lore.kernel.org/r/20191022084318.22256-7-brgl@bgdev.pl 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 91fcdbbae89d..276a03c24691 100644
--- a/include/linux/platform_device.h
+++ b/include/linux/platform_device.h
@@ -60,6 +60,9 @@ devm_platform_ioremap_resource(struct platform_device *pdev,
extern void __iomem *
devm_platform_ioremap_resource_wc(struct platform_device *pdev,
unsigned int index);
+extern void __iomem *
+devm_platform_ioremap_resource_byname(struct platform_device *pdev,
+ const char *name);
extern int platform_get_irq(struct platform_device *, unsigned int);
extern int platform_get_irq_optional(struct platform_device *, unsigned int);
extern int platform_irq_count(struct platform_device *);