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 <sughosh.ganu@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Sughosh Ganu 2022-01-30 00:51:08 +05:30 committed by Simon Glass
parent ebc87d0daf
commit 82ee8bfe51

View 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);