[PATCH] common: boards: wolfvision: use state_by_alias instead of opencoding

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

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





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux