aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/device.h
diff options
context:
space:
mode:
authorMing Lei <ming.lei@canonical.com>2012-08-04 00:01:26 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-08-16 16:30:29 -0400
commitbddb1b9078505bb0e430c87c5015c0963f7a594f (patch)
treeef3d3a201dd23633d5c2dad8fb00be82a35f3023 /include/linux/device.h
parentf531f05ae9437df5ba1ebd90017e4dd5526048e9 (diff)
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,
536#else 536#else
537extern void *devres_alloc(dr_release_t release, size_t size, gfp_t gfp); 537extern void *devres_alloc(dr_release_t release, size_t size, gfp_t gfp);
538#endif 538#endif
539extern void devres_for_each_res(struct device *dev, dr_release_t release,
540 dr_match_t match, void *match_data,
541 void (*fn)(struct device *, void *, void *),
542 void *data);
539extern void devres_free(void *res); 543extern void devres_free(void *res);
540extern void devres_add(struct device *dev, void *res); 544extern void devres_add(struct device *dev, void *res);
541extern void *devres_find(struct device *dev, dr_release_t release, 545extern void *devres_find(struct device *dev, dr_release_t release,