[PATCH 3/4] i.MX: imu-bbu-internal: Make use of devpath_to_name()

Andrey Smirnov andrew.smirnov at gmail.com
Mon Dec 4 07:37:25 PST 2017


Convert the code to use shared function from fs.h

Signed-off-by: Andrey Smirnov <andrew.smirnov at gmail.com>
---
 arch/arm/mach-imx/imx-bbu-internal.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/arm/mach-imx/imx-bbu-internal.c b/arch/arm/mach-imx/imx-bbu-internal.c
index 51ec8b827..a139331a6 100644
--- a/arch/arm/mach-imx/imx-bbu-internal.c
+++ b/arch/arm/mach-imx/imx-bbu-internal.c
@@ -131,8 +131,7 @@ static int imx_bbu_check_prereq(struct bbu_data *data)
 	if (ret)
 		return ret;
 
-	if (!strncmp(data->devicefile, "/dev/", 5))
-		device_detect_by_name(data->devicefile + 5);
+	device_detect_by_name(devpath_to_name(data->devicefile));
 
 	return 0;
 }
-- 
2.14.3




More information about the barebox mailing list