From e55af002222e7986e3a2986f9560ee5609004ba4 Mon Sep 17 00:00:00 2001 From: James Goppert Date: Sun, 13 Sep 2015 13:58:44 -0400 Subject: [PATCH] Removed weak attributes. --- src/drivers/boards/aerocore/aerocore_spi.c | 2 +- src/drivers/boards/px4fmu-v1/px4fmu_spi.c | 2 +- src/drivers/boards/px4fmu-v2/px4fmu_spi.c | 2 +- src/drivers/hmc5883/hmc5883.h | 4 ++-- src/drivers/ms5611/ms5611.h | 6 +++--- src/modules/uORB/uORB.h | 10 ++-------- 6 files changed, 10 insertions(+), 16 deletions(-) diff --git a/src/drivers/boards/aerocore/aerocore_spi.c b/src/drivers/boards/aerocore/aerocore_spi.c index 5a4dd15b26..1ce3f35f88 100644 --- a/src/drivers/boards/aerocore/aerocore_spi.c +++ b/src/drivers/boards/aerocore/aerocore_spi.c @@ -67,7 +67,7 @@ * ************************************************************************************/ -__EXPORT void weak_function stm32_spiinitialize(void) +__EXPORT void stm32_spiinitialize(void) { #ifdef CONFIG_STM32_SPI1 stm32_configgpio(GPIO_SPI1_NSS); diff --git a/src/drivers/boards/px4fmu-v1/px4fmu_spi.c b/src/drivers/boards/px4fmu-v1/px4fmu_spi.c index 8ef17c36ed..2a444796ff 100644 --- a/src/drivers/boards/px4fmu-v1/px4fmu_spi.c +++ b/src/drivers/boards/px4fmu-v1/px4fmu_spi.c @@ -67,7 +67,7 @@ * ************************************************************************************/ -__EXPORT void weak_function stm32_spiinitialize(void) +__EXPORT void stm32_spiinitialize(void) { stm32_configgpio(GPIO_SPI_CS_GYRO); stm32_configgpio(GPIO_SPI_CS_ACCEL); diff --git a/src/drivers/boards/px4fmu-v2/px4fmu_spi.c b/src/drivers/boards/px4fmu-v2/px4fmu_spi.c index 64b9926b8d..a380e05bd5 100644 --- a/src/drivers/boards/px4fmu-v2/px4fmu_spi.c +++ b/src/drivers/boards/px4fmu-v2/px4fmu_spi.c @@ -67,7 +67,7 @@ * ************************************************************************************/ -__EXPORT void weak_function stm32_spiinitialize(void) +__EXPORT void stm32_spiinitialize(void) { #ifdef CONFIG_STM32_SPI1 stm32_configgpio(GPIO_SPI_CS_GYRO); diff --git a/src/drivers/hmc5883/hmc5883.h b/src/drivers/hmc5883/hmc5883.h index 9607fe6149..4cef0aa8cf 100644 --- a/src/drivers/hmc5883/hmc5883.h +++ b/src/drivers/hmc5883/hmc5883.h @@ -48,6 +48,6 @@ #define ID_C_WHO_AM_I '3' /* interface factories */ -extern device::Device *HMC5883_SPI_interface(int bus) weak_function; -extern device::Device *HMC5883_I2C_interface(int bus) weak_function; +extern device::Device *HMC5883_SPI_interface(int bus); +extern device::Device *HMC5883_I2C_interface(int bus); typedef device::Device *(*HMC5883_constructor)(int); diff --git a/src/drivers/ms5611/ms5611.h b/src/drivers/ms5611/ms5611.h index a7e305b2aa..cc3e4c5920 100644 --- a/src/drivers/ms5611/ms5611.h +++ b/src/drivers/ms5611/ms5611.h @@ -80,7 +80,7 @@ extern bool crc4(uint16_t *n_prom); } /* namespace */ /* interface factories */ -extern device::Device *MS5611_spi_interface(ms5611::prom_u &prom_buf, uint8_t busnum) __attribute__((weak)); -extern device::Device *MS5611_i2c_interface(ms5611::prom_u &prom_buf, uint8_t busnum) __attribute__((weak)); -extern device::Device *MS5611_sim_interface(ms5611::prom_u &prom_buf, uint8_t busnum) __attribute__((weak)); +extern device::Device *MS5611_spi_interface(ms5611::prom_u &prom_buf, uint8_t busnum); +extern device::Device *MS5611_i2c_interface(ms5611::prom_u &prom_buf, uint8_t busnum); +extern device::Device *MS5611_sim_interface(ms5611::prom_u &prom_buf, uint8_t busnum); typedef device::Device *(*MS5611_constructor)(ms5611::prom_u &prom_buf, uint8_t busnum); diff --git a/src/modules/uORB/uORB.h b/src/modules/uORB/uORB.h index c887925fcf..6ead26186b 100644 --- a/src/modules/uORB/uORB.h +++ b/src/modules/uORB/uORB.h @@ -89,20 +89,14 @@ enum ORB_PRIO { /** * Declare (prototype) the uORB metadata for a topic. * - * Note that optional topics are declared weak; this allows a potential - * subscriber to attempt to subscribe to a topic that is not known to the - * system at runtime. The ORB_ID() macro will return NULL/nullptr for - * such a topic, and attempts to advertise or subscribe to it will - * return -1/ENOENT (see below). - * * @param _name The name of the topic. */ #if defined(__cplusplus) # define ORB_DECLARE(_name) extern "C" const struct orb_metadata __orb_##_name __EXPORT -# define ORB_DECLARE_OPTIONAL(_name) extern "C" const struct orb_metadata __orb_##_name __EXPORT __attribute__((weak)) +# define ORB_DECLARE_OPTIONAL(_name) extern "C" const struct orb_metadata __orb_##_name __EXPORT #else # define ORB_DECLARE(_name) extern const struct orb_metadata __orb_##_name __EXPORT -# define ORB_DECLARE_OPTIONAL(_name) extern const struct orb_metadata __orb_##_name __EXPORT __attribute__((weak)) +# define ORB_DECLARE_OPTIONAL(_name) extern const struct orb_metadata __orb_##_name __EXPORT #endif /**