X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fmotech-lps-30x%2Fapi.c;h=40bb2d9578873a0baa4f5708f714d07309d3eda6;hb=0af636bed97c174bea46e61e961eaa1b0b162e0f;hp=bcbc2954310882e3b184a3fb011b594cbba34f2a;hpb=ca95e90fb37f127b3d58d90a8b40ce1ca85641d2;p=libsigrok.git diff --git a/src/hardware/motech-lps-30x/api.c b/src/hardware/motech-lps-30x/api.c index bcbc2954..40bb2d95 100644 --- a/src/hardware/motech-lps-30x/api.c +++ b/src/hardware/motech-lps-30x/api.c @@ -375,9 +375,9 @@ static GSList *do_scan(lps_modelid modelid, struct sr_dev_driver *drv, GSList *o GSList *devices; const char *conn, *serialcomm; int cnt; - gchar buf[LINELEN_MAX]; + gchar buf[LINELEN_MAX]; gchar channel[10]; - char* verstr; + char *verstr; sdi = NULL; devc = NULL; @@ -444,7 +444,11 @@ static GSList *do_scan(lps_modelid modelid, struct sr_dev_driver *drv, GSList *o Therefore just print an error message, but do not exit with error. */ sr_err("Failed to query for hardware version: %d %s", errno, strerror(errno)); - sdi = sr_dev_inst_new(SR_ST_INACTIVE, VENDOR_MOTECH, models[modelid].modelstr, verstr); + sdi = sr_dev_inst_new(); + sdi->status = SR_ST_INACTIVE; + sdi->vendor = g_strdup(VENDOR_MOTECH); + sdi->model = g_strdup(models[modelid].modelstr); + sdi->version = g_strdup(verstr); sdi->driver = drv; sdi->inst_type = SR_INST_SERIAL; sdi->conn = serial;