diff options
author | Ming Lei <ming.lei@canonical.com> | 2012-08-04 08:01:26 +0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-08-17 00:30:29 +0400 |
commit | bddb1b9078505bb0e430c87c5015c0963f7a594f (patch) | |
tree | ef3d3a201dd23633d5c2dad8fb00be82a35f3023 /include/linux/device.h | |
parent | f531f05ae9437df5ba1ebd90017e4dd5526048e9 (diff) | |
download | linux-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.h | 4 |
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, |