From 5799495a5b5766625b057291b84a6439e545a957 Mon Sep 17 00:00:00 2001 From: Flavio Santes Date: Wed, 21 Dec 2016 00:07:42 -0600 Subject: [PATCH] drivers/sensor: Add the ARG_UNUSED macro Add the ARG_UNUSED macro to avoid compiler warnings. Change-Id: I2e0d8ccdcd2d525e109cee6c3bd1035640618eb0 Signed-off-by: Flavio Santes --- drivers/sensor/bmg160/bmg160_trigger.c | 3 +++ drivers/sensor/bmi160/bmi160_trigger.c | 3 +++ drivers/sensor/fxos8700/fxos8700_trigger.c | 3 +++ 3 files changed, 9 insertions(+) diff --git a/drivers/sensor/bmg160/bmg160_trigger.c b/drivers/sensor/bmg160/bmg160_trigger.c index 115a9f52c7c..0e12e99c7c2 100644 --- a/drivers/sensor/bmg160/bmg160_trigger.c +++ b/drivers/sensor/bmg160/bmg160_trigger.c @@ -31,6 +31,9 @@ static void bmg160_gpio_callback(struct device *port, struct gpio_callback *cb, struct bmg160_device_data *bmg160 = CONTAINER_OF(cb, struct bmg160_device_data, gpio_cb); + ARG_UNUSED(port); + ARG_UNUSED(pin); + #if defined(CONFIG_BMG160_TRIGGER_OWN_THREAD) k_sem_give(&bmg160->trig_sem); #elif defined(CONFIG_BMG160_TRIGGER_GLOBAL_THREAD) diff --git a/drivers/sensor/bmi160/bmi160_trigger.c b/drivers/sensor/bmi160/bmi160_trigger.c index 9b934e1988f..3537953cd4d 100644 --- a/drivers/sensor/bmi160/bmi160_trigger.c +++ b/drivers/sensor/bmi160/bmi160_trigger.c @@ -121,6 +121,9 @@ static void bmi160_gpio_callback(struct device *port, struct bmi160_device_data *bmi160 = CONTAINER_OF(cb, struct bmi160_device_data, gpio_cb); + ARG_UNUSED(port); + ARG_UNUSED(pin); + #if defined(CONFIG_BMI160_TRIGGER_OWN_THREAD) k_sem_give(&bmi160->sem); #elif defined(CONFIG_BMI160_TRIGGER_GLOBAL_THREAD) diff --git a/drivers/sensor/fxos8700/fxos8700_trigger.c b/drivers/sensor/fxos8700/fxos8700_trigger.c index a35983be60b..bc4fcd21c12 100644 --- a/drivers/sensor/fxos8700/fxos8700_trigger.c +++ b/drivers/sensor/fxos8700/fxos8700_trigger.c @@ -79,6 +79,9 @@ static void fxos8700_thread_main(void *arg1, void *unused1, void *unused2) struct device *dev = (struct device *)arg1; struct fxos8700_data *data = dev->driver_data; + ARG_UNUSED(unused1); + ARG_UNUSED(unused2); + while (true) { k_sem_take(&data->trig_sem, K_FOREVER); fxos8700_handle_int(dev);