From d80d47000b24122d1254a936a5e9f49d6fb7bf39 Mon Sep 17 00:00:00 2001 From: Gerard Marull-Paretas Date: Mon, 17 Jan 2022 15:13:09 +0100 Subject: [PATCH] pm: device: add parentheses to Z_PM_DEVICE_GET Improve the macro by adding surrounding parentheses. Signed-off-by: Gerard Marull-Paretas --- include/pm/device.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/pm/device.h b/include/pm/device.h index d7006a90613..88ed855effb 100644 --- a/include/pm/device.h +++ b/include/pm/device.h @@ -189,7 +189,7 @@ struct pm_device { * * @param dev_name Device name. */ -#define Z_PM_DEVICE_GET(dev_name) &Z_PM_DEVICE_NAME(dev_name) +#define Z_PM_DEVICE_GET(dev_name) (&Z_PM_DEVICE_NAME(dev_name)) #else #define Z_PM_DEVICE_DEFINE(node_id, dev_name, pm_action_cb)