summaryrefslogtreecommitdiff
path: root/include/linux/device.h
diff options
context:
space:
mode:
authorMing Lei <ming.lei@canonical.com>2012-08-04 08:01:26 +0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-08-17 00:30:29 +0400
commitbddb1b9078505bb0e430c87c5015c0963f7a594f (patch)
treeef3d3a201dd23633d5c2dad8fb00be82a35f3023 /include/linux/device.h
parentf531f05ae9437df5ba1ebd90017e4dd5526048e9 (diff)
downloadlinux-bddb1b9078505bb0e430c87c5015c0963f7a594f.tar.xz
driver core: devres: introduce devres_for_each_res
This patch introduces one devres API of devres_for_each_res so that the device's driver can iterate each resource it has interest in. The firmware loader will use the API to get each firmware name from the device instance. Signed-off-by: Ming Lei <ming.lei@canonical.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/device.h')
-rw-r--r--include/linux/device.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/device.h b/include/linux/device.h
index 52a5f15a2223..ecd900663726 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -536,6 +536,10 @@ extern void *__devres_alloc(dr_release_t release, size_t size, gfp_t gfp,
#else
extern void *devres_alloc(dr_release_t release, size_t size, gfp_t gfp);
#endif
+extern void devres_for_each_res(struct device *dev, dr_release_t release,
+ dr_match_t match, void *match_data,
+ void (*fn)(struct device *, void *, void *),
+ void *data);
extern void devres_free(void *res);
extern void devres_add(struct device *dev, void *res);
extern void *devres_find(struct device *dev, dr_release_t release,