diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2009-12-01 15:36:26 +0100 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2009-12-08 06:02:51 +0100 |
commit | 7fb19ea054a0cdf1a4d935e68d51bde4d3725414 (patch) | |
tree | ec4882255440c93c8104e59efaceffae98f379d3 /arch | |
parent | powerpc/kvm: Sync guest visible MMU state (diff) | |
download | linux-7fb19ea054a0cdf1a4d935e68d51bde4d3725414.tar.xz linux-7fb19ea054a0cdf1a4d935e68d51bde4d3725414.zip |
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')
-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 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); |