return SR_OK;
}
-static int hw_init(void)
+static int hw_init(struct sr_context *sr_ctx)
{
struct drv_context *drvc;
return SR_ERR;
}
+ drvc->sr_ctx = sr_ctx;
di->priv = drvc;
return SR_OK;
return SR_ERR_BUG;
}
- if (serial_open(devc->serial, O_RDWR) != SR_OK)
+ if (serial_open(devc->serial, SERIAL_RDWR) != SR_OK)
return SR_ERR;
sdi->status = SR_ST_ACTIVE;