aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-powerpc/ibmebus.h
diff options
context:
space:
mode:
authorJoachim Fenkes <fenkes@de.ibm.com>2007-09-26 05:45:51 -0400
committerPaul Mackerras <paulus@samba.org>2007-10-17 08:30:08 -0400
commit6b08f3ae8eec27a9e557468a48540bc64fd4a524 (patch)
tree0739be87e3262ddef0535949186670f4ae5eb850 /include/asm-powerpc/ibmebus.h
parent55347cc9962fbf2048a3cf78e92c3f52035ac524 (diff)
[POWERPC] ibmebus: Move to of_device and of_platform_driver, match eHCA and eHEA drivers
Replace struct ibmebus_dev and struct ibmebus_driver with struct of_device and struct of_platform_driver, respectively. Match the external ibmebus interface and drivers using it. Signed-off-by: Joachim Fenkes <fenkes@de.ibm.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Roland Dreier <rolandd@cisco.com> Acked-by: Jeff Garzik <jeff@garzik.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'include/asm-powerpc/ibmebus.h')
-rw-r--r--include/asm-powerpc/ibmebus.h38
1 files changed, 7 insertions, 31 deletions
diff --git a/include/asm-powerpc/ibmebus.h b/include/asm-powerpc/ibmebus.h
index 87d396e28db2..1a9d9aea21fa 100644
--- a/include/asm-powerpc/ibmebus.h
+++ b/include/asm-powerpc/ibmebus.h
@@ -43,42 +43,18 @@
43#include <linux/device.h> 43#include <linux/device.h>
44#include <linux/interrupt.h> 44#include <linux/interrupt.h>
45#include <linux/mod_devicetable.h> 45#include <linux/mod_devicetable.h>
46#include <asm/of_device.h> 46#include <linux/of_device.h>
47#include <linux/of_platform.h>
47 48
48extern struct bus_type ibmebus_bus_type; 49extern struct bus_type ibmebus_bus_type;
49 50
50struct ibmebus_dev { 51int ibmebus_register_driver(struct of_platform_driver *drv);
51 struct of_device ofdev; 52void ibmebus_unregister_driver(struct of_platform_driver *drv);
52};
53 53
54struct ibmebus_driver { 54int ibmebus_request_irq(u32 ist, irq_handler_t handler,
55 char *name; 55 unsigned long irq_flags, const char *devname,
56 struct of_device_id *id_table;
57 int (*probe) (struct ibmebus_dev *dev, const struct of_device_id *id);
58 int (*remove) (struct ibmebus_dev *dev);
59 struct device_driver driver;
60};
61
62int ibmebus_register_driver(struct ibmebus_driver *drv);
63void ibmebus_unregister_driver(struct ibmebus_driver *drv);
64
65int ibmebus_request_irq(struct ibmebus_dev *dev,
66 u32 ist,
67 irq_handler_t handler,
68 unsigned long irq_flags, const char * devname,
69 void *dev_id); 56 void *dev_id);
70void ibmebus_free_irq(struct ibmebus_dev *dev, u32 ist, void *dev_id); 57void ibmebus_free_irq(u32 ist, void *dev_id);
71
72static inline struct ibmebus_driver *to_ibmebus_driver(struct device_driver *drv)
73{
74 return container_of(drv, struct ibmebus_driver, driver);
75}
76
77static inline struct ibmebus_dev *to_ibmebus_dev(struct device *dev)
78{
79 return container_of(dev, struct ibmebus_dev, ofdev.dev);
80}
81
82 58
83#endif /* __KERNEL__ */ 59#endif /* __KERNEL__ */
84#endif /* _ASM_IBMEBUS_H */ 60#endif /* _ASM_IBMEBUS_H */