From e32c974336500b2ea8b117c8f00a37acec17e0a1 Mon Sep 17 00:00:00 2001 From: Igor Knippenberg Date: Sun, 3 Oct 2021 22:17:44 +0200 Subject: [PATCH] samples: sensors: fdc2x1x: fixed bugs in pm_info() Both ARG_UNUSED in pm_info(), cause errors when using PM_DEVICE=y. Added a default case in pm_info(), to fix warnings. Signed-off-by: Igor Knippenberg --- samples/sensor/fdc2x1x/src/main.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/samples/sensor/fdc2x1x/src/main.c b/samples/sensor/fdc2x1x/src/main.c index 04b40e9dfed..cb8f6e5a930 100644 --- a/samples/sensor/fdc2x1x/src/main.c +++ b/samples/sensor/fdc2x1x/src/main.c @@ -36,9 +36,6 @@ static void trigger_handler(const struct device *dev, #ifdef CONFIG_PM_DEVICE static void pm_info(enum pm_device_state state, int status) { - ARG_UNUSED(dev); - ARG_UNUSED(arg); - switch (state) { case PM_DEVICE_STATE_ACTIVE: printk("Enter ACTIVE_STATE "); @@ -49,6 +46,8 @@ static void pm_info(enum pm_device_state state, int status) case PM_DEVICE_STATE_OFF: printk("Enter OFF_STATE "); break; + default: + printk("Unknown power state"); } if (status) {