aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/include/asm/macio.h
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2009-12-01 14:36:26 +0000
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2009-12-08 16:02:51 +1100
commit7fb19ea054a0cdf1a4d935e68d51bde4d3725414 (patch)
treeec4882255440c93c8104e59efaceffae98f379d3 /arch/powerpc/include/asm/macio.h
parentpowerpc/kvm: Sync guest visible MMU state (diff)
downloadlinux-dev-7fb19ea054a0cdf1a4d935e68d51bde4d3725414.tar.xz
linux-dev-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/powerpc/include/asm/macio.h')
-rw-r--r--arch/powerpc/include/asm/macio.h2
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);