X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;f=hardware%2Ftondaj-sl-814%2Fapi.c;h=5c72c6a29221a8424f6a5f5814c62bf440cb3360;hb=cbc8cbd8bbd664043c349133818e0ab41422c751;hp=beb8c3378724859c1e67a07530c7877f15dd0afd;hpb=a54dd31e380ca4b469a20e41a0023d1dd9ec3c99;p=libsigrok.git diff --git a/hardware/tondaj-sl-814/api.c b/hardware/tondaj-sl-814/api.c index beb8c337..5c72c6a2 100644 --- a/hardware/tondaj-sl-814/api.c +++ b/hardware/tondaj-sl-814/api.c @@ -73,7 +73,7 @@ static int clear_instances(void) return SR_OK; } -static int hw_init(void) +static int hw_init(struct sr_context *sr_ctx) { struct drv_context *drvc; @@ -82,6 +82,7 @@ static int hw_init(void) return SR_ERR_MALLOC; } + drvc->sr_ctx = sr_ctx; di->priv = drvc; return SR_OK; @@ -119,10 +120,8 @@ static GSList *hw_scan(GSList *options) break; } } - if (!conn) { - sr_dbg("Couldn't determine connection options."); + if (!conn) return NULL; - } if (!serialcomm) serialcomm = SERIALCOMM;