[PATCH] common: boards: wolfvision: use state_by_alias instead of opencoding
Ahmad Fatoum
a.fatoum at pengutronix.de
Tue May 14 23:07:36 PDT 2024
This introduces no functional change, but makes code a bit more compact.
Cc: Michael Riesch <michael.riesch at wolfvision.net>
Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
common/boards/wolfvision/common.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/common/boards/wolfvision/common.c b/common/boards/wolfvision/common.c
index f483918cecfe..5484a8ac6b06 100644
--- a/common/boards/wolfvision/common.c
+++ b/common/boards/wolfvision/common.c
@@ -62,11 +62,7 @@ int wolfvision_register_ethaddr(void)
char mac[ETH_ALEN];
int ret;
- ret = of_device_ensure_probed_by_alias("state");
- if (ret)
- return ret;
-
- state = state_by_name("state");
+ state = state_by_alias("state");
if (!state)
return -ENOENT;
--
2.39.2
More information about the barebox
mailing list