From a46e02c7eabc58cb61eebe94d3a69def5f4edb2a Mon Sep 17 00:00:00 2001 From: Daniel Cederman Date: Thu, 13 Mar 2014 14:33:00 +0100 Subject: 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. --- c/src/lib/libbsp/sparc/shared/1553/b1553brm.c | 5 +++++ c/src/lib/libbsp/sparc/shared/1553/b1553brm_pci.c | 3 +++ 2 files changed, 8 insertions(+) (limited to 'c/src/lib/libbsp/sparc/shared/1553') diff --git a/c/src/lib/libbsp/sparc/shared/1553/b1553brm.c b/c/src/lib/libbsp/sparc/shared/1553/b1553brm.c index c156222797..045146a58b 100644 --- a/c/src/lib/libbsp/sparc/shared/1553/b1553brm.c +++ b/c/src/lib/libbsp/sparc/shared/1553/b1553brm.c @@ -30,6 +30,8 @@ #ifndef B1553BRM_PREFIX #define B1553BRM_PREFIX(name) b1553brm##name +#else + #define B1553BRM_REGISTER_STATIC #endif /* default to no translation */ @@ -340,6 +342,9 @@ int brm_register_leon3_ramon_asic(void){ #endif #endif +#ifdef B1553BRM_REGISTER_STATIC +static +#endif int B1553BRM_PREFIX(_register)(struct ambapp_bus *bus, unsigned int clksel, unsigned int clkdiv, unsigned int brm_freq) { rtems_status_code r; diff --git a/c/src/lib/libbsp/sparc/shared/1553/b1553brm_pci.c b/c/src/lib/libbsp/sparc/shared/1553/b1553brm_pci.c index 3be26b1b74..2ae4af5607 100644 --- a/c/src/lib/libbsp/sparc/shared/1553/b1553brm_pci.c +++ b/c/src/lib/libbsp/sparc/shared/1553/b1553brm_pci.c @@ -1,3 +1,6 @@ +#include +#include + /* Select PCI driver */ #define B1553BRM_NO_AMBA #define B1553BRM_PCI -- cgit v1.2.3