diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2009-12-01 14:36:26 +0000 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2009-12-08 16:02:51 +1100 |
commit | 7fb19ea054a0cdf1a4d935e68d51bde4d3725414 (patch) | |
tree | ec4882255440c93c8104e59efaceffae98f379d3 /arch/powerpc/include | |
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')
-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 079c06eae44..2b7b39294a6 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 return res->end - res->start + 1; } +extern int macio_enable_devres(struct macio_dev *dev); + extern int macio_request_resource(struct macio_dev *dev, int resource_no, const char *name); extern void macio_release_resource(struct macio_dev *dev, int resource_no); extern int macio_request_resources(struct macio_dev *dev, const char *name); |