static int dev_open(struct sr_dev_inst *sdi)
{
if (!(sdi->priv = g_try_malloc0(sizeof(struct session_vdev)))) {
- sr_err("%s: sdi->priv malloc failed", __func__);
+ sr_err("Device context malloc failed.");
return SR_ERR_MALLOC;
}
return SR_ERR;
break;
default:
- return SR_ERR_ARG;
+ return SR_ERR_NA;
}
return SR_OK;
vdev->num_probes = g_variant_get_uint64(data);
break;
default:
- sr_err("Unknown capability: %d.", id);
- return SR_ERR;
+ return SR_ERR_NA;
}
return SR_OK;
hwcaps, ARRAY_SIZE(hwcaps), sizeof(int32_t));
break;
default:
- return SR_ERR_ARG;
+ return SR_ERR_NA;
}
return SR_OK;
.api_version = 1,
.init = init,
.cleanup = cleanup,
+ .scan = NULL,
+ .dev_list = NULL,
+ .dev_clear = NULL,
.config_get = config_get,
.config_set = config_set,
.config_list = config_list,
.dev_close = NULL,
.dev_acquisition_start = dev_acquisition_start,
.dev_acquisition_stop = NULL,
+ .priv = NULL,
};