]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/colead-slm/api.c
Eliminate sr_dev_inst_new().
[libsigrok.git] / src / hardware / colead-slm / api.c
index 9ea441781520244c00e52ffaf5a4d5215044fc7d..e879a102189c19ad4f7c8df2091c34c27514d3ff 100644 (file)
@@ -82,9 +82,10 @@ static GSList *scan(GSList *options)
        if (!serialcomm)
                serialcomm = SERIALCOMM;
 
-       if (!(sdi = sr_dev_inst_new(SR_ST_INACTIVE, "Colead",
-                       "SL-5868P", NULL)))
-               return NULL;
+       sdi = g_malloc0(sizeof(struct sr_dev_inst));
+       sdi->status = SR_ST_INACTIVE;
+       sdi->vendor = g_strdup("Colead");
+       sdi->model = g_strdup("SL-5868P");
 
        if (!(devc = g_try_malloc0(sizeof(struct dev_context)))) {
                sr_dbg("Device context malloc failed.");