[PATCH 3/8] blspec: Use device_detect_by_name

Sascha Hauer s.hauer at pengutronix.de
Fri Jun 26 00:31:02 PDT 2015


device_detect_by_name will automatically separate by colons now,
we no longer have to do this in the blspec code.

Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
 common/blspec.c | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/common/blspec.c b/common/blspec.c
index 3506388..2429560 100644
--- a/common/blspec.c
+++ b/common/blspec.c
@@ -575,17 +575,10 @@ int blspec_scan_devicename(struct blspec *blspec, const char *devname)
 {
 	struct device_d *dev;
 	struct cdev *cdev;
-	const char *colon;
 
 	pr_debug("%s: %s\n", __func__, devname);
 
-	colon = strchr(devname, '.');
-	if (colon) {
-		char *name = xstrdup(devname);
-		*strchr(name, '.') = 0;
-		device_detect_by_name(name);
-		free(name);
-	}
+	device_detect_by_name(devname);
 
 	cdev = cdev_by_name(devname);
 	if (cdev) {
-- 
2.1.4




More information about the barebox mailing list