]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/teleinfo/api.c
Change sr_dev_inst_new() to take no parameters.
[libsigrok.git] / src / hardware / teleinfo / api.c
index 63432f58d922632c6de71096be4ab76ed0b2f288..3e6a4d4521fff4e9656e5cd1128a0bf0ab3cd408 100644 (file)
@@ -92,8 +92,10 @@ static GSList *scan(GSList *options)
 
        sr_info("Found device on port %s.", conn);
 
-       if (!(sdi = sr_dev_inst_new(SR_ST_INACTIVE, "EDF", "Teleinfo", NULL)))
-               goto scan_cleanup;
+       sdi = sr_dev_inst_new();
+       sdi->status = SR_ST_INACTIVE;
+       sdi->vendor = g_strdup("EDF");
+       sdi->model = g_strdup("Teleinfo");
 
        if (!(devc = g_try_malloc0(sizeof(struct dev_context)))) {
                sr_err("Device context malloc failed.");