diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2009-12-01 09:36:26 -0500 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2009-12-08 00:02:51 -0500 |
commit | 7fb19ea054a0cdf1a4d935e68d51bde4d3725414 (patch) | |
tree | ec4882255440c93c8104e59efaceffae98f379d3 /arch/powerpc/include/asm/macio.h | |
parent | e15a113700324f7fdcee95589875daed2b98a2fe (diff) |
powerpc/macio: Add devres support to macio_device
This adds some basic devres support. When enabled via macio_enable_devres()
resources requested by drivers will be automatically released.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/include/asm/macio.h')
-rw-r--r-- | arch/powerpc/include/asm/macio.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/macio.h b/arch/powerpc/include/asm/macio.h index 079c06eae446..2b7b39294a6a 100644 --- a/arch/powerpc/include/asm/macio.h +++ b/arch/powerpc/include/asm/macio.h | |||
@@ -78,6 +78,8 @@ static inline unsigned long macio_resource_len(struct macio_dev *dev, int resour | |||
78 | return res->end - res->start + 1; | 78 | return res->end - res->start + 1; |
79 | } | 79 | } |
80 | 80 | ||
81 | extern int macio_enable_devres(struct macio_dev *dev); | ||
82 | |||
81 | extern int macio_request_resource(struct macio_dev *dev, int resource_no, const char *name); | 83 | extern int macio_request_resource(struct macio_dev *dev, int resource_no, const char *name); |
82 | extern void macio_release_resource(struct macio_dev *dev, int resource_no); | 84 | extern void macio_release_resource(struct macio_dev *dev, int resource_no); |
83 | extern int macio_request_resources(struct macio_dev *dev, const char *name); | 85 | extern int macio_request_resources(struct macio_dev *dev, const char *name); |