Message ID | 20210121205716.964652-6-sjg@chromium.org |
---|---|
State | Accepted |
Commit | ef79ef21a85272f52be58089a96bc1299aa04458 |
Delegated to: | Simon Glass |
Headers | show |
Series | More minor clean-ups and improvements | expand |
At present if these calls are used with of-platdata, a confusing error is
produced, referring to a function not actually called by the code causing
the problem.
Fix this by not inlining, so that the error mentions the dev_read_...()
function and it is more obvious what is going on.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
include/dm/read.h | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
Applied to u-boot-dm, thanks!
diff --git a/include/dm/read.h b/include/dm/read.h index c875e11a132..f6f8b875d1c 100644 --- a/include/dm/read.h +++ b/include/dm/read.h @@ -30,8 +30,7 @@ static inline const struct device_node *dev_np(const struct udevice *dev) } #endif -#ifndef CONFIG_DM_DEV_READ_INLINE - +#if !defined(CONFIG_DM_DEV_READ_INLINE) || CONFIG_IS_ENABLED(OF_PLATDATA) /** * dev_read_u32() - read a 32-bit integer from a device's DT property *
At present if these calls are used with of-platdata, a confusing error is produced, referring to a function not actually called by the code causing the problem. Fix this by not inlining, so that the error mentions the dev_read_...() function and it is more obvious what is going on. Signed-off-by: Simon Glass <sjg@chromium.org> --- include/dm/read.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)