]> sigrok.org Git - libsigrok.git/blobdiff - src/hardware/demo/demo.c
Change sr_dev_inst_new() to take no parameters.
[libsigrok.git] / src / hardware / demo / demo.c
index 2a8ea2341242691d1034bf6584ab51b02ae7e1b2..b5cb276c9747f4011ed42ef8917abe1cf3866aa5 100644 (file)
@@ -289,11 +289,10 @@ static GSList *scan(GSList *options)
        }
 
        devices = NULL;
-       sdi = sr_dev_inst_new(SR_ST_ACTIVE, "Demo device", NULL, NULL);
-       if (!sdi) {
-               sr_err("Device instance creation failed.");
-               return NULL;
-       }
+
+       sdi = sr_dev_inst_new();
+       sdi->status = SR_ST_ACTIVE;
+       sdi->model = "Demo device";
        sdi->driver = di;
 
        devc = g_malloc(sizeof(struct dev_context));