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

changes.
pull/1/head
Michael Brown 2005-04-21 18:30:12 +00:00
parent 98ff29345e
commit 8153a0fa7e
2 changed files with 5 additions and 6 deletions

View File

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

View File

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