diff options
author | Daniel Cederman <cederman@gaisler.com> | 2014-03-13 14:33:00 +0100 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@oarcorp.com> | 2014-03-21 09:57:20 -0500 |
commit | a46e02c7eabc58cb61eebe94d3a69def5f4edb2a (patch) | |
tree | f0c96baae327889ade36c6d91e3e5f415031a161 /c/src/lib/libbsp/sparc/shared/spw | |
parent | smc91111: Move driver attach prototype to header file. (diff) | |
download | rtems-a46e02c7eabc58cb61eebe94d3a69def5f4edb2a.tar.bz2 |
bsps/sparc: Make local functions static.
The PCI and RASTA versions of the uart, spacewire and 1553 drivers directly includes the c-file of the standard versions
of the drivers, but uses a macro to change the name of the driver register function. When the standard version is
used this function should be global, when it is included as part of the PCI and RASTA versions it should be local and
static.
Diffstat (limited to 'c/src/lib/libbsp/sparc/shared/spw')
-rw-r--r-- | c/src/lib/libbsp/sparc/shared/spw/grspw.c | 5 | ||||
-rw-r--r-- | c/src/lib/libbsp/sparc/shared/spw/grspw_pci.c | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/c/src/lib/libbsp/sparc/shared/spw/grspw.c b/c/src/lib/libbsp/sparc/shared/spw/grspw.c index 538e8bb099..b311500ffd 100644 --- a/c/src/lib/libbsp/sparc/shared/spw/grspw.c +++ b/c/src/lib/libbsp/sparc/shared/spw/grspw.c @@ -58,6 +58,8 @@ #ifndef GRSPW_PREFIX #define GRSPW_PREFIX(name) grspw##name +#else + #define GRSPW_REGISTER_STATIC #endif /* default to no translation */ @@ -373,6 +375,9 @@ static rtems_device_driver grspw_control( static rtems_driver_address_table grspw_driver = GRSPW_DRIVER_TABLE_ENTRY; static struct ambapp_bus *amba_bus; +#ifdef GRSPW_REGISTER_STATIC +static +#endif int GRSPW_PREFIX(_register)(struct ambapp_bus *bus) { rtems_status_code r; diff --git a/c/src/lib/libbsp/sparc/shared/spw/grspw_pci.c b/c/src/lib/libbsp/sparc/shared/spw/grspw_pci.c index 2a9a8d6094..fce2fa8b36 100644 --- a/c/src/lib/libbsp/sparc/shared/spw/grspw_pci.c +++ b/c/src/lib/libbsp/sparc/shared/spw/grspw_pci.c @@ -1,3 +1,7 @@ +#include <ambapp.h> +#include <rtems/libio.h> +#include <grspw_pci.h> + /* Select PCI driver */ #define GRSPW_PCI @@ -70,6 +74,7 @@ static inline unsigned int hw_to_cpu(unsigned int addr) { #endif int grspwpci_interrupt_handler(int irq, void *arg); + #include "grspw.c" /* |