]> sigrok.org Git - libsigrok.git/blobdiff - src/lcr/es51919.c
Change sr_dev_inst_new() to take no parameters.
[libsigrok.git] / src / lcr / es51919.c
index b8773493ac6c49d7f16cc551782aaec601e6af9c..4cacbe9a134c84d54fb2f4fa46d23e1934a1a6d8 100644 (file)
@@ -843,8 +843,10 @@ SR_PRIV struct sr_dev_inst *es51919_serial_scan(GSList *options,
 
        sr_info("Found device on port %s.", serial->port);
 
-       if (!(sdi = sr_dev_inst_new(SR_ST_INACTIVE, vendor, model, NULL)))
-               goto scan_cleanup;
+       sdi = sr_dev_inst_new();
+       sdi->status = SR_ST_INACTIVE;
+       sdi->vendor = g_strdup(vendor);
+       sdi->model = g_strdup(model);
 
        if (!(devc = g_try_malloc0(sizeof(struct dev_context)))) {
                sr_err("Device context malloc failed.");