summaryrefslogtreecommitdiff
path: root/arch/powerpc/include/asm/vio.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/include/asm/vio.h')
-rw-r--r--arch/powerpc/include/asm/vio.h13
1 files changed, 3 insertions, 10 deletions
diff --git a/arch/powerpc/include/asm/vio.h b/arch/powerpc/include/asm/vio.h
index e7479a4abf96..7c444150c5ad 100644
--- a/arch/powerpc/include/asm/vio.h
+++ b/arch/powerpc/include/asm/vio.h
@@ -39,7 +39,7 @@
*/
#define VIO_CMO_MIN_ENT 1562624
-extern struct bus_type vio_bus_type;
+extern const struct bus_type vio_bus_type;
struct iommu_table;
@@ -156,15 +156,8 @@ static inline int vio_enable_interrupts(struct vio_dev *dev)
}
#endif
-static inline struct vio_driver *to_vio_driver(struct device_driver *drv)
-{
- return container_of(drv, struct vio_driver, driver);
-}
-
-static inline struct vio_dev *to_vio_dev(struct device *dev)
-{
- return container_of(dev, struct vio_dev, dev);
-}
+#define to_vio_driver(__drv) container_of_const(__drv, struct vio_driver, driver)
+#define to_vio_dev(__dev) container_of_const(__dev, struct vio_dev, dev)
#endif /* __KERNEL__ */
#endif /* _ASM_POWERPC_VIO_H */