From 8153a0fa7e94f8e7a4330fc3414cd6b5366a279b Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Thu, 21 Apr 2005 18:30:12 +0000 Subject: [PATCH] Made macros more like the previous driver API, to minimise required changes. --- src/include/dev.h | 6 +++--- src/include/pci.h | 5 ++--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/include/dev.h b/src/include/dev.h index 327a2714..4f114496 100644 --- a/src/include/dev.h +++ b/src/include/dev.h @@ -201,10 +201,10 @@ struct device_driver { #define __device_driver \ __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) \ - static struct device_driver _name __device_driver = { \ - .name = _name_string, \ + static struct device_driver device_ ## _bus_info __device_driver = { \ + .name = _name, \ .type_driver = &_type_driver, \ .bus_driver = &_bus_driver, \ .bus_driver_info = ( struct bus_driver_info * ) &_bus_info, \ diff --git a/src/include/pci.h b/src/include/pci.h index f904504f..49e36d50 100644 --- a/src/include/pci.h +++ b/src/include/pci.h @@ -307,12 +307,11 @@ struct pci_driver_info { * Define a PCI driver. * */ -#define PCI_DRIVER( _info_name, _ids, _class ) \ - static struct pci_driver_info _info_name = { \ +#define PCI_DRIVER( _ids, _class ) { \ .ids = _ids, \ .id_count = sizeof ( _ids ) / sizeof ( _ids[0] ), \ .class = _class, \ - }; + } /* * These are the functions we expect pci_io.c to provide.