hw_init(): Save struct sr_context * parameter in struct drv_context

This commit is contained in:
Peter Stuge 2012-12-03 02:49:36 +01:00 committed by Bert Vermeulen
parent 34f06b903e
commit 1ebe4b4e69
15 changed files with 15 additions and 0 deletions

View File

@ -103,6 +103,7 @@ static int hw_init(struct sr_context *sr_ctx)
return SR_ERR_MALLOC;
}
drvc->sr_ctx = sr_ctx;
di->priv = drvc;
return SR_OK;

View File

@ -440,6 +440,7 @@ static int hw_init(struct sr_context *sr_ctx)
sr_err("Driver context malloc failed.");
return SR_ERR_MALLOC;
}
drvc->sr_ctx = sr_ctx;
adi->priv = drvc;
return SR_OK;

View File

@ -77,6 +77,7 @@ static int hw_init(struct sr_context *sr_ctx)
return SR_ERR_MALLOC;
}
drvc->sr_ctx = sr_ctx;
di->priv = drvc;
return SR_OK;

View File

@ -86,6 +86,7 @@ static int hw_init(struct sr_context *sr_ctx)
return SR_ERR;
}
drvc->sr_ctx = sr_ctx;
di->priv = drvc;
return SR_OK;

View File

@ -161,6 +161,7 @@ static int hw_init(struct sr_context *sr_ctx)
sr_err("Driver context malloc failed.");
return SR_ERR_MALLOC;
}
drvc->sr_ctx = sr_ctx;
ddi->priv = drvc;
return SR_OK;

View File

@ -90,6 +90,7 @@ static int hw_init(struct sr_context *sr_ctx)
return SR_ERR_MALLOC;
}
drvc->sr_ctx = sr_ctx;
di->priv = drvc;
return SR_OK;

View File

@ -414,6 +414,7 @@ static int hw_init(struct sr_context *sr_ctx)
return SR_ERR;
}
drvc->sr_ctx = sr_ctx;
fdi->priv = drvc;
return SR_OK;

View File

@ -268,6 +268,7 @@ static int hw_init(struct sr_context *sr_ctx)
return SR_ERR;
}
drvc->sr_ctx = sr_ctx;
hdi->priv = drvc;
return SR_OK;

View File

@ -370,6 +370,7 @@ static int hw_init(struct sr_context *sr_ctx)
sr_err("ols: driver context malloc failed.");
return SR_ERR_MALLOC;
}
drvc->sr_ctx = sr_ctx;
odi->priv = drvc;
return SR_OK;

View File

@ -202,6 +202,7 @@ static int hw_init(struct sr_context *sr_ctx, int dmm)
di = di_22_812;
sr_dbg("Selected '%s' subdriver.", di->name);
drvc->sr_ctx = sr_ctx;
di->priv = drvc;
return SR_OK;

View File

@ -82,6 +82,7 @@ static int hw_init(struct sr_context *sr_ctx)
return SR_ERR_MALLOC;
}
drvc->sr_ctx = sr_ctx;
di->priv = drvc;
return SR_OK;

View File

@ -75,6 +75,7 @@ static int hw_init(struct sr_context *sr_ctx, int dmm)
di = di_vc820;
sr_dbg("Selected '%s' subdriver.", di->name);
drvc->sr_ctx = sr_ctx;
di->priv = drvc;
return SR_OK;

View File

@ -84,6 +84,7 @@ static int hw_init(struct sr_context *sr_ctx)
sr_err("Driver context malloc failed.");
return SR_ERR_MALLOC;
}
drvc->sr_ctx = sr_ctx;
di->priv = drvc;
return SR_OK;

View File

@ -311,6 +311,7 @@ static int hw_init(struct sr_context *sr_ctx)
sr_err("zeroplus: driver context malloc failed.");
return SR_ERR_MALLOC;
}
drvc->sr_ctx = sr_ctx;
zdi->priv = drvc;
if (libusb_init(&usb_context) != 0) {

View File

@ -76,6 +76,7 @@ struct sr_serial_dev_inst {
/* Private driver context. */
struct drv_context {
struct sr_context *sr_ctx;
GSList *instances;
};