struct dev_context *devc;
GSList *l;
- drvc = di->priv;
+ if (!(drvc = di->priv))
+ return SR_OK;
+
for (l = drvc->instances; l; l = l->next) {
if (!(sdi = l->data))
continue;
return SR_OK;
}
-static int hw_init(void)
+static int hw_init(struct sr_context *sr_ctx)
{
struct drv_context *drvc;
/* TODO */
+ drvc->sr_ctx = sr_ctx;
di->priv = drvc;
return SR_OK;
return SR_OK;
}
-static int hw_dev_acquisition_stop(const struct sr_dev_inst *sdi,
- void *cb_data)
+static int hw_dev_acquisition_stop(struct sr_dev_inst *sdi, void *cb_data)
{
(void)cb_data;