]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/zeroplus-logic-cube/api.c
Change sr_dev_inst_new() to take no parameters.
[libsigrok.git] / src / hardware / zeroplus-logic-cube / api.c
index 3eeb9811a7cdc6f136f7600525ed7142dc9a1b5f..76ae1e331d1112808d75babe1d2e736485f0824e 100644 (file)
@@ -222,11 +222,10 @@ static GSList *scan(GSList *options)
                sr_info("Found ZEROPLUS %s.", prof->model_name);
 
                /* Register the device with libsigrok. */
-               if (!(sdi = sr_dev_inst_new(SR_ST_INACTIVE,
-                               VENDOR_NAME, prof->model_name, NULL))) {
-                       sr_err("%s: sr_dev_inst_new failed", __func__);
-                       return NULL;
-               }
+               sdi = sr_dev_inst_new();
+               sdi->status = SR_ST_INACTIVE;
+               sdi->vendor = g_strdup(VENDOR_NAME);
+               sdi->model = g_strdup(prof->model_name);
                sdi->driver = di;
                sdi->serial_num = g_strdup(serial_num);
                sdi->connection_id = g_strdup(connection_id);