浏览代码

Move the concept of logical devices inside the struct isapnp_device.

tags/v0.9.3
Michael Brown 19 年前
父节点
当前提交
05986a848f
共有 1 个文件被更改,包括 18 次插入12 次删除
  1. 18
    12
      src/include/isapnp.h

+ 18
- 12
src/include/isapnp.h 查看文件

126
  * An ISAPnP serial identifier
126
  * An ISAPnP serial identifier
127
  *
127
  *
128
  */
128
  */
129
-union isapnp_identifier {
130
-	char bytes[9];
131
-	struct {
132
-		uint16_t vendor_id;
133
-		uint16_t prod_id;
134
-		uint32_t serial;
135
-		uint8_t checksum;
136
-	} __attribute__ (( packed ));
129
+struct isapnp_identifier {
130
+	uint16_t vendor_id;
131
+	uint16_t prod_id;
132
+	uint32_t serial;
133
+	uint8_t checksum;
134
+} __attribute__ (( packed ));
135
+
136
+/*
137
+ * An ISAPnP logical device ID structure
138
+ *
139
+ */
140
+struct isapnp_logdevid {
141
+	uint16_t vendor_id;
142
+	uint16_t prod_id;
143
+	uint16_t flags;
137
 } __attribute__ (( packed ));
144
 } __attribute__ (( packed ));
138
 
145
 
139
 /*
146
 /*
143
 struct isapnp_device {
150
 struct isapnp_device {
144
 	char *magic; /* must be first */
151
 	char *magic; /* must be first */
145
 	const char *name;
152
 	const char *name;
146
-	unsigned char csn;
153
+	uint8_t csn;
154
+	uint8_t logdev;
147
 	uint16_t vendor_id;
155
 	uint16_t vendor_id;
148
 	uint16_t prod_id;
156
 	uint16_t prod_id;
149
 	uint16_t ioaddr;
157
 	uint16_t ioaddr;
189
 extern int find_isapnp_boot_device ( struct dev *dev,
197
 extern int find_isapnp_boot_device ( struct dev *dev,
190
 				     struct isapnp_driver *driver );
198
 				     struct isapnp_driver *driver );
191
 extern void activate_isapnp_device ( struct isapnp_device *isapnp,
199
 extern void activate_isapnp_device ( struct isapnp_device *isapnp,
192
-				     uint8_t logdev );
193
-extern void deactivate_isapnp_device ( struct isapnp_device *isapnp,
194
-				       uint8_t logdev );
200
+				     int active );
195
 
201
 
196
 #endif /* ISAPNP_H */
202
 #endif /* ISAPNP_H */

正在加载...
取消
保存