summaryrefslogtreecommitdiffstats
path: root/include/linux/mfd/core.h
diff options
context:
space:
mode:
authorLaxman Dewangan <ldewangan@nvidia.com>2016-04-08 00:12:55 +0530
committerLee Jones <lee.jones@linaro.org>2016-04-19 07:54:19 +0100
commita8f447be8056d9ce17bf7757d6de79426700bb8b (patch)
treea8a238dddf7b76badcc030c35761c9756e7e567b /include/linux/mfd/core.h
parentbd425113a186f6dc104e07cd501916dc51f25e6a (diff)
downloadlinux-a8f447be8056d9ce17bf7757d6de79426700bb8b.tar.bz2
mfd: Add resource managed APIs for mfd_add_devices
Add resource managed API devm_mfd_add_devices() for the mfd_add_devices(). This helps in reducing code in error path as it is not required to call mfd_remove_devices() explicitly to remove all child-devices. In some cases, it also helps not to implement .remove() callback which get called during driver unbind. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'include/linux/mfd/core.h')
-rw-r--r--include/linux/mfd/core.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/mfd/core.h b/include/linux/mfd/core.h
index bc6f7e00fb3d..4a0268afe546 100644
--- a/include/linux/mfd/core.h
+++ b/include/linux/mfd/core.h
@@ -131,4 +131,8 @@ static inline int mfd_add_hotplug_devices(struct device *parent,
extern void mfd_remove_devices(struct device *parent);
+extern int devm_mfd_add_devices(struct device *dev, int id,
+ const struct mfd_cell *cells, int n_devs,
+ struct resource *mem_base,
+ int irq_base, struct irq_domain *irq_domain);
#endif