}
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));