[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cdi-devel] [PATCH 1/3] cdi.h: Introduce cdi_bus_data



Kevin Wolf wrote:
+ Each device gets a structure that links it to its bus. For now this
  means moving the cdi_pci_device out of the specific device struct of
  each driver into the generic cdi_device.

Signed-off-by: Kevin Wolf <kevin@xxxxxxxxxx>
[...]
diff --git a/include/cdi.h b/include/cdi.h
index b09bcff..a0e1826 100644
--- a/include/cdi.h
+++ b/include/cdi.h
@@ -33,9 +33,16 @@ typedef enum {
 } cdi_device_type_t;
struct cdi_driver;
+struct cdi_device;
Not critical at all, but is this necessary?
+
+struct cdi_bus_data {
+    cdi_device_type_t   bus_type;
+};
+
 struct cdi_device {
-    const char*         name;
-    struct cdi_driver*  driver;
+    const char*             name;
+    struct cdi_driver*      driver;
+    struct cdi_bus_data*    bus_data;
// tyndur-spezifisch
     void*               backdev;
[...]