]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/manson-hcs-3xxx/api.c
Change sr_dev_inst_new() to take no parameters.
[libsigrok.git] / src / hardware / manson-hcs-3xxx / api.c
index fad2e8dae6f161c9b7a6cef4a5510d7b17f7554c..6be41b9fd9b67460d98fffbe78c5ef20b3fcd6f5 100644 (file)
@@ -150,12 +150,10 @@ static GSList *scan(GSList *options)
        }
 
        /* Init device instance, etc. */
-       if (!(sdi = sr_dev_inst_new(SR_ST_INACTIVE, "Manson",
-                                   models[model_id].name, NULL))) {
-               sr_err("Failed to create device instance.");
-               return NULL;
-       }
-
+       sdi = sr_dev_inst_new();
+       sdi->status = SR_ST_INACTIVE;
+       sdi->vendor = g_strdup("Manson");
+       sdi->model = g_strdup(models[model_id].name);
        sdi->inst_type = SR_INST_SERIAL;
        sdi->conn = serial;
        sdi->driver = di;