mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] common: boards: wolfvision: use state_by_alias instead of opencoding
@ 2024-05-15  6:07 Ahmad Fatoum
  2024-05-15  6:29 ` Michael Riesch
  2024-05-16  7:18 ` Sascha Hauer
  0 siblings, 2 replies; 5+ messages in thread
From: Ahmad Fatoum @ 2024-05-15  6:07 UTC (permalink / raw)
  To: barebox; +Cc: Michael Riesch, Ahmad Fatoum

This introduces no functional change, but makes code a bit more compact.

Cc: Michael Riesch <michael.riesch@wolfvision.net>
Signed-off-by: Ahmad Fatoum <a.fatoum@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




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-05-16  7:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-15  6:07 [PATCH] common: boards: wolfvision: use state_by_alias instead of opencoding Ahmad Fatoum
2024-05-15  6:29 ` Michael Riesch
2024-05-15  6:35   ` Ahmad Fatoum
2024-05-15  6:39     ` Michael Riesch
2024-05-16  7:18 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox