]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
dm: Use parenthesis for the device_get_ops macro argument
authorSughosh Ganu <sughosh.ganu@linaro.org>
Sat, 29 Jan 2022 19:21:08 +0000 (00:51 +0530)
committerSimon Glass <sjg@chromium.org>
Wed, 9 Feb 2022 19:26:12 +0000 (12:26 -0700)
Use parenthesis for the device_get_ops macro argument. This prevents
errors when using an expression for the parameter.

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
include/dm/device.h

index 435a1114f1c4ee4c2b19c13b420d7aca9aae58ba..cb52a0997c86de40b06bb37401b34f0f94835693 100644 (file)
@@ -212,7 +212,7 @@ struct udevice_rt {
 #define DM_MAX_SEQ_STR 3
 
 /* Returns the operations for a device */
-#define device_get_ops(dev)    (dev->driver->ops)
+#define device_get_ops(dev)    ((dev)->driver->ops)
 
 #if CONFIG_IS_ENABLED(OF_PLATDATA_RT)
 u32 dev_get_flags(const struct udevice *dev);