Ver código fonte

Add print_info method to dev_operations.

tags/v0.9.3
Michael Brown 19 anos atrás
pai
commit
95da907d5f
1 arquivos alterados com 4 adições e 0 exclusões
  1. 4
    0
      src/include/dev.h

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

@@ -33,6 +33,7 @@ struct dev {
33 33
 
34 34
 struct dev_operations {
35 35
 	void ( *disable ) ( struct dev * );
36
+	void ( *print_info ) ( struct dev * );
36 37
 	int ( *load_configuration ) ( struct dev * );
37 38
 	int ( *load ) ( struct dev * );
38 39
 };
@@ -53,6 +54,9 @@ struct boot_driver {
53 54
 extern void print_drivers ( void );
54 55
 extern int probe ( struct dev *dev );
55 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 60
 static inline int load_configuration ( struct dev *dev ) {
57 61
 	return dev->dev_op->load_configuration ( dev );
58 62
 }

Carregando…
Cancelar
Salvar