Explorar el Código

Add print_info method to dev_operations.

tags/v0.9.3
Michael Brown hace 19 años
padre
commit
95da907d5f
Se han modificado 1 ficheros con 4 adiciones y 0 borrados
  1. 4
    0
      src/include/dev.h

+ 4
- 0
src/include/dev.h Ver fichero

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
 }

Loading…
Cancelar
Guardar