X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fteleinfo%2Fapi.c;h=3e6a4d4521fff4e9656e5cd1128a0bf0ab3cd408;hb=0af636bed97c174bea46e61e961eaa1b0b162e0f;hp=63432f58d922632c6de71096be4ab76ed0b2f288;hpb=c7e455625807d31fcaf95f36a23f1afeba033e1f;p=libsigrok.git diff --git a/src/hardware/teleinfo/api.c b/src/hardware/teleinfo/api.c index 63432f58..3e6a4d45 100644 --- a/src/hardware/teleinfo/api.c +++ b/src/hardware/teleinfo/api.c @@ -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.");