X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;f=hardware%2Ftondaj-sl-814%2Fapi.c;h=da88bd070d479939db147dde54938d7c8da2e49c;hb=063e7aef6d41d4c44591ff93672079998bf9622f;hp=c621eeb8cf3042033c3fe21ac628447b89fd0014;hpb=4b97c74e0b5c19ad0ee04620b618461248ab69d7;p=libsigrok.git diff --git a/hardware/tondaj-sl-814/api.c b/hardware/tondaj-sl-814/api.c index c621eeb8..da88bd07 100644 --- a/hardware/tondaj-sl-814/api.c +++ b/hardware/tondaj-sl-814/api.c @@ -70,17 +70,7 @@ static int clear_instances(void) static int hw_init(struct sr_context *sr_ctx) { - struct drv_context *drvc; - - if (!(drvc = g_try_malloc0(sizeof(struct drv_context)))) { - sr_err("Driver context malloc failed."); - return SR_ERR_MALLOC; - } - - drvc->sr_ctx = sr_ctx; - di->priv = drvc; - - return SR_OK; + return std_hw_init(sr_ctx, di, DRIVER_LOG_DOMAIN); } static GSList *hw_scan(GSList *options)