X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;f=hardware%2Flascar-el-usb%2Fapi.c;h=1ab2a68fdb3e7f6a0fc6f23401e1d417dc4c93a4;hb=7ec5b54955118d8c1ee003a02c3334f1a0046457;hp=1804f2d54793b1ea4e450a2661b8a2db2051b78b;hpb=4b97c74e0b5c19ad0ee04620b618461248ab69d7;p=libsigrok.git diff --git a/hardware/lascar-el-usb/api.c b/hardware/lascar-el-usb/api.c index 1804f2d5..1ab2a68f 100644 --- a/hardware/lascar-el-usb/api.c +++ b/hardware/lascar-el-usb/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)