Content-Type: multipart/mixed; boundary="===============8506728170904295583==" MIME-Version: 1.0 From: ramesh.thomas at intel.com Subject: [Accel-config] [PATCH] accel-config: Fix char device path issue with iax device type Date: Mon, 28 Jun 2021 15:31:42 -0400 Message-ID: <20210628193142.1024977-1-ramesh.thomas@intel.com> To: accel-config@lists.01.org List-ID: --===============8506728170904295583== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Ramesh Thomas 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 --- 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 ac= cfg_wq *wq, char *buf, = ctx =3D 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 =3D n =3D 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 =3D -ENOENT; goto ext_uacce; } = - n =3D sprintf(p, "/dev/%s/%s", wq->device->bus_type_str, f); + n =3D sprintf(p, "/dev/%s/%s", wq->device->device_type_str, f); = if ((size_t)n >=3D size) { err(ctx, "Buffer size too small. Need %d bytes\n", n + 1); -- = 2.26.3 --===============8506728170904295583==--