]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/serial-dmm/api.c
Change sr_dev_inst_new() to take no parameters.
[libsigrok.git] / src / hardware / serial-dmm / api.c
index 70f05f2d52ccc8f7339a5b9a3eef9816ec452b71..87e63b10f4f07b6413c056ebdd0e60d4632992ce 100644 (file)
@@ -456,9 +456,10 @@ static GSList *sdmm_scan(const char *conn, const char *serialcomm, int dmm)
 
        sr_info("Found device on port %s.", conn);
 
-       if (!(sdi = sr_dev_inst_new(SR_ST_INACTIVE, dmms[dmm].vendor,
-                                   dmms[dmm].device, NULL)))
-               goto scan_cleanup;
+       sdi = sr_dev_inst_new();
+       sdi->status = SR_ST_INACTIVE;
+       sdi->vendor = g_strdup(dmms[dmm].vendor);
+       sdi->model = g_strdup(dmms[dmm].device);
 
        if (!(devc = g_try_malloc0(sizeof(struct dev_context)))) {
                sr_err("Device context malloc failed.");