ソースを参照

Made macros more like the previous driver API, to minimise required

changes.
tags/v0.9.3
Michael Brown 19年前
コミット
8153a0fa7e
2個のファイルの変更5行の追加6行の削除
  1. 3
    3
      src/include/dev.h
  2. 2
    3
      src/include/pci.h

+ 3
- 3
src/include/dev.h ファイルの表示

@@ -201,10 +201,10 @@ struct device_driver {
201 201
 #define __device_driver \
202 202
 	__attribute__ (( used, __section__ ( ".drivers.device" ) ))
203 203
 
204
-#define DRIVER(_name,_name_string,_type_driver,_bus_driver,_bus_info,	      \
204
+#define DRIVER(_name,_type_driver,_bus_driver,_bus_info,	 	      \
205 205
 	       _probe,_disable) 		 			      \
206
-	static struct device_driver _name __device_driver = {		      \
207
-		.name = _name_string,					      \
206
+	static struct device_driver device_ ## _bus_info __device_driver = {  \
207
+		.name = _name,						      \
208 208
 		.type_driver = &_type_driver,				      \
209 209
 		.bus_driver = &_bus_driver,				      \
210 210
 		.bus_driver_info = ( struct bus_driver_info * ) &_bus_info,   \

+ 2
- 3
src/include/pci.h ファイルの表示

@@ -307,12 +307,11 @@ struct pci_driver_info {
307 307
  * Define a PCI driver.
308 308
  *
309 309
  */
310
-#define PCI_DRIVER( _info_name, _ids, _class )				\
311
-	static struct pci_driver_info _info_name = {			\
310
+#define PCI_DRIVER( _ids, _class ) {					\
312 311
 		.ids = _ids,						\
313 312
 		.id_count = sizeof ( _ids ) / sizeof ( _ids[0] ),	\
314 313
 		.class = _class,					\
315
-	};
314
+	}
316 315
 
317 316
 /*
318 317
  * These are the functions we expect pci_io.c to provide.

読み込み中…
キャンセル
保存