From: Sughosh Ganu Date: Sat, 29 Jan 2022 19:21:08 +0000 (+0530) Subject: dm: Use parenthesis for the device_get_ops macro argument X-Git-Url: http://git.dujemihanovic.xyz/img/sics.gif?a=commitdiff_plain;h=82ee8bfe519307b4175bb0f751da73c8555a0a25;p=u-boot.git dm: Use parenthesis for the device_get_ops macro argument Use parenthesis for the device_get_ops macro argument. This prevents errors when using an expression for the parameter. Signed-off-by: Sughosh Ganu Reviewed-by: Simon Glass --- diff --git a/include/dm/device.h b/include/dm/device.h index 435a1114f1..cb52a0997c 100644 --- a/include/dm/device.h +++ b/include/dm/device.h @@ -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);