Merge master.kernel.org:/pub/scm/linux/kernel/git/dtor/input
[cascardo/linux.git] / include / asm-sparc / ebus.h
index 0dc3c01..5465288 100644 (file)
@@ -14,6 +14,7 @@
 #endif
 #include <asm/oplib.h>
 #include <asm/prom.h>
+#include <asm/of_device.h>
 
 struct linux_ebus_child {
        struct linux_ebus_child         *next;
@@ -27,6 +28,7 @@ struct linux_ebus_child {
 };
 
 struct linux_ebus_device {
+       struct of_device                ofdev;
        struct linux_ebus_device        *next;
        struct linux_ebus_child         *children;
        struct linux_ebus               *bus;
@@ -36,14 +38,17 @@ struct linux_ebus_device {
        unsigned int                     irqs[PROMINTR_MAX];
        int                              num_irqs;
 };
+#define to_ebus_device(d) container_of(d, struct linux_ebus_device, ofdev.dev)
 
 struct linux_ebus {
+       struct of_device                ofdev;
        struct linux_ebus               *next;
        struct linux_ebus_device        *devices;
        struct linux_pbm_info           *parent;
        struct pci_dev                  *self;
        struct device_node              *prom_node;
 };
+#define to_ebus(d) container_of(d, struct linux_ebus, ofdev.dev)
 
 struct linux_ebus_dma {
        unsigned int dcsr;