static int init(struct sr_dev_driver *di, struct sr_context *sr_ctx)
{
- return std_init(sr_ctx, di, LOG_PREFIX);
+ return std_init(di, sr_ctx, LOG_PREFIX);
}
static struct sr_dev_inst *create_device(struct sr_dev_driver *di,
static int dev_open(struct sr_dev_inst *sdi)
{
- struct drv_context *drvc;
struct dev_context *devc;
int64_t timediff_us, timediff_ms;
int ret;
- drvc = sdi->driver->context;
devc = sdi->priv;
- if (!drvc) {
- sr_err("Driver was not initialized.");
- return SR_ERR;
- }
-
/*
* If we didn't need to upload FX2 firmware in scan(), open the device
* right away. Otherwise, wait up to MAX_RENUM_DELAY_MS ms for the