[Accel-config] [PATCH] accel-config: Fix char device path issue with iax device type

ramesh.thomas at intel.com
Newsgroups dev.linux.lists.accel-config
Message-ID <[email protected]>
From: Ramesh Thomas <ramesh.thomas(a)intel.com>

Even in kernel versions where iax bus type was removed dsa driver
creates char device path under iax. Use device type to create the path
instead of bus type in accel-config.

Signed-off-by: Ramesh Thomas <ramesh.thomas(a)intel.com>
---
 accfg/lib/libaccfg.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/accfg/lib/libaccfg.c b/accfg/lib/libaccfg.c
index 1463a4d..f53751e 100644
--- a/accfg/lib/libaccfg.c
+++ b/accfg/lib/libaccfg.c
@@ -2093,7 +2093,7 @@ ACCFG_EXPORT int accfg_wq_get_user_dev_path(struct accfg_wq *wq, char *buf,
 
 	ctx = accfg_device_get_ctx(wq->device);
 
-	sprintf(p, "/dev/%s", wq->device->bus_type_str);
+	sprintf(p, "/dev/%s", wq->device->device_type_str);
 	n1 = n = scandir(p, &d, NULL, alphasort);
 	if (n < 0) {
 		err(ctx, "Device path not found %s\n", p);
@@ -2112,12 +2112,12 @@ ACCFG_EXPORT int accfg_wq_get_user_dev_path(struct accfg_wq *wq, char *buf,
 	if (n < 0) {
 		err(ctx, "Device for %s not found at /dev/%s\n",
 				accfg_wq_get_devname(wq),
-				wq->device->bus_type_str);
+				wq->device->device_type_str);
 		rc = -ENOENT;
 		goto ext_uacce;
 	}
 
-	n = sprintf(p, "/dev/%s/%s", wq->device->bus_type_str, f);
+	n = sprintf(p, "/dev/%s/%s", wq->device->device_type_str, f);
 
 	if ((size_t)n >= size) {
 		err(ctx, "Buffer size too small. Need %d bytes\n", n + 1);
-- 
2.26.3
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.