]> 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 0f4225e5c93af561d2d499f0d9d8d2edf0ee2f81..e879a102189c19ad4f7c8df2091c34c27514d3ff 100644 (file)
@@ -82,9 +82,10 @@ static GSList *scan(GSList *options)
        if (!serialcomm)
                serialcomm = SERIALCOMM;
 
-       if (!(sdi = sr_dev_inst_new(0, 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.");