浏览代码

Add print_info method to dev_operations.

tags/v0.9.3
Michael Brown 20 年前
父节点
当前提交
95da907d5f
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4
    0
      src/include/dev.h

+ 4
- 0
src/include/dev.h 查看文件

33
 
33
 
34
 struct dev_operations {
34
 struct dev_operations {
35
 	void ( *disable ) ( struct dev * );
35
 	void ( *disable ) ( struct dev * );
36
+	void ( *print_info ) ( struct dev * );
36
 	int ( *load_configuration ) ( struct dev * );
37
 	int ( *load_configuration ) ( struct dev * );
37
 	int ( *load ) ( struct dev * );
38
 	int ( *load ) ( struct dev * );
38
 };
39
 };
53
 extern void print_drivers ( void );
54
 extern void print_drivers ( void );
54
 extern int probe ( struct dev *dev );
55
 extern int probe ( struct dev *dev );
55
 extern void disable ( struct dev *dev );
56
 extern void disable ( struct dev *dev );
57
+static inline void print_info ( struct dev *dev ) {
58
+	dev->dev_op->print_info ( dev );
59
+}
56
 static inline int load_configuration ( struct dev *dev ) {
60
 static inline int load_configuration ( struct dev *dev ) {
57
 	return dev->dev_op->load_configuration ( dev );
61
 	return dev->dev_op->load_configuration ( dev );
58
 }
62
 }

正在加载...
取消
保存