Skip to content

Commit 708ba30

Browse files
skullbox305cfriedt
authored andcommitted
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 <[email protected]>
1 parent 903b5d7 commit 708ba30

File tree

1 file changed

+2
-3
lines changed
  • samples/sensor/fdc2x1x/src

1 file changed

+2
-3
lines changed

samples/sensor/fdc2x1x/src/main.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,6 @@ static void trigger_handler(const struct device *dev,
3636
#ifdef CONFIG_PM_DEVICE
3737
static void pm_info(enum pm_device_state state, int status)
3838
{
39-
ARG_UNUSED(dev);
40-
ARG_UNUSED(arg);
41-
4239
switch (state) {
4340
case PM_DEVICE_STATE_ACTIVE:
4441
printk("Enter ACTIVE_STATE ");
@@ -49,6 +46,8 @@ static void pm_info(enum pm_device_state state, int status)
4946
case PM_DEVICE_STATE_OFF:
5047
printk("Enter OFF_STATE ");
5148
break;
49+
default:
50+
printk("Unknown power state");
5251
}
5352

5453
if (status) {

0 commit comments

Comments
 (0)