The global *di alias was used to keep track of the driver context.
It caused issues with trying to use several subdrivers at once, so
its use was obsoleted.
The correct context is preserved through different mechanisms, either
the *sdi pointer, or wrappers which pass the correct context.
The *di alias is no longer used, so remove it.
Signed-off-by: Alexandru Gagniuc <redacted>
SR_PRIV struct sr_dev_driver radioshack_22_168_driver_info;
SR_PRIV struct sr_dev_driver radioshack_22_812_driver_info;
-/* After hw_init() this will point to a device-specific entry (see above). */
-static struct sr_dev_driver *di = NULL;
-
SR_PRIV struct dmm_info dmms[] = {
{
"Digitek", "DT4000ZC", "2400/8n1", 2400,
return SR_ERR_MALLOC;
}
- di = dmms[dmm].di;
sr_dbg("Selected '%s' subdriver.", dmms[dmm].di->name);
drvc->sr_ctx = sr_ctx;
- //// di->priv = drvc;
dmms[dmm].di->priv = drvc;
return SR_OK;
sr_info("Probing port %s.", conn);
- //// drvc = di->priv;
drvc = dmms[dmm].di->priv;
devices = NULL;
serial_flush(serial);