feat: support user-spcae pci rescan
[lunaix-os.git] / lunaix-os / includes / lunaix / device.h
index 2d9f82bda5fe7f6da6245256a2477a1055a182d3..fac62a9b54f179c5d42d1ed598c96fe81234e330 100644 (file)
@@ -116,7 +116,8 @@ struct device_def
     struct devclass class;
 
     int (*init)(struct device_def*);
-    int (*init_for)(struct device_def*, struct device*);
+    int (*bind)(struct device_def*, struct device*);
+    int (*free)(struct device_def*, void* instance);
 };
 
 static inline u32_t
@@ -226,4 +227,6 @@ device_locked(struct device* dev)
     return mutex_on_hold(&dev->lock);
 }
 
+#define devprintf_expand(devident) (devident)->fn_grp, (devident)->unique
+
 #endif /* __LUNAIX_DEVICE_H */