std: Drop hw_ from function names.

The per-driver API calls no longer have a hw_ prefix (e.g. hw_init()
became init() and so on), so drop the 'hw_' from the std versions
for those API callbacks too.
This commit is contained in:
Uwe Hermann 2013-05-31 15:46:57 +02:00
parent 3678cf73fe
commit f6beaac55c
23 changed files with 39 additions and 39 deletions

View File

@ -68,7 +68,7 @@ static int clear_instances(void)
static int init(struct sr_context *sr_ctx)
{
return std_hw_init(sr_ctx, di, LOG_PREFIX);
return std_init(sr_ctx, di, LOG_PREFIX);
}
static GSList *scan(GSList *options)
@ -283,7 +283,7 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi, void *cb_data)
static int dev_acquisition_stop(struct sr_dev_inst *sdi, void *cb_data)
{
return std_hw_dev_acquisition_stop_serial(sdi, cb_data, dev_close,
return std_dev_acquisition_stop_serial(sdi, cb_data, dev_close,
sdi->conn, LOG_PREFIX);
}

View File

@ -53,7 +53,7 @@ static int clear_instances(void)
static int init(struct sr_context *sr_ctx)
{
return std_hw_init(sr_ctx, di, LOG_PREFIX);
return std_init(sr_ctx, di, LOG_PREFIX);
}
static GSList *scan(GSList *options)

View File

@ -396,7 +396,7 @@ static int clear_instances(void)
static int init(struct sr_context *sr_ctx)
{
return std_hw_init(sr_ctx, di, LOG_PREFIX);
return std_init(sr_ctx, di, LOG_PREFIX);
}
static GSList *scan(GSList *options)

View File

@ -36,7 +36,7 @@ static struct sr_dev_driver *di = &brymen_bm857_driver_info;
static int init(struct sr_context *sr_ctx)
{
return std_hw_init(sr_ctx, di, LOG_PREFIX);
return std_init(sr_ctx, di, LOG_PREFIX);
}
static int clear_instances(void)
@ -264,8 +264,8 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi, void *cb_data)
static int dev_acquisition_stop(struct sr_dev_inst *sdi, void *cb_data)
{
return std_hw_dev_acquisition_stop_serial(sdi, cb_data, dev_close,
sdi->conn, LOG_PREFIX);
return std_dev_acquisition_stop_serial(sdi, cb_data, dev_close,
sdi->conn, LOG_PREFIX);
}
SR_PRIV struct sr_dev_driver brymen_bm857_driver_info = {

View File

@ -73,7 +73,7 @@ static int clear_instances(void)
static int init(struct sr_context *sr_ctx)
{
return std_hw_init(sr_ctx, di, LOG_PREFIX);
return std_init(sr_ctx, di, LOG_PREFIX);
}
static GSList *scan(GSList *options)

View File

@ -52,7 +52,7 @@ static int clear_instances(void)
static int init(struct sr_context *sr_ctx)
{
return std_hw_init(sr_ctx, di, LOG_PREFIX);
return std_init(sr_ctx, di, LOG_PREFIX);
}
static GSList *scan(GSList *options)
@ -231,8 +231,8 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi, void *cb_data)
static int dev_acquisition_stop(struct sr_dev_inst *sdi, void *cb_data)
{
return std_hw_dev_acquisition_stop_serial(sdi, cb_data, dev_close,
sdi->conn, LOG_PREFIX);
return std_dev_acquisition_stop_serial(sdi, cb_data, dev_close,
sdi->conn, LOG_PREFIX);
}
SR_PRIV struct sr_dev_driver colead_slm_driver_info = {

View File

@ -152,7 +152,7 @@ static int clear_instances(void)
static int init(struct sr_context *sr_ctx)
{
return std_hw_init(sr_ctx, di, LOG_PREFIX);
return std_init(sr_ctx, di, LOG_PREFIX);
}
static GSList *scan(GSList *options)

View File

@ -65,7 +65,7 @@ static int clear_instances(void)
static int init(struct sr_context *sr_ctx)
{
return std_hw_init(sr_ctx, di, LOG_PREFIX);
return std_init(sr_ctx, di, LOG_PREFIX);
}
static GSList *fluke_scan(const char *conn, const char *serialcomm)
@ -323,8 +323,8 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi, void *cb_data)
static int dev_acquisition_stop(struct sr_dev_inst *sdi, void *cb_data)
{
return std_hw_dev_acquisition_stop_serial(sdi, cb_data, dev_close,
sdi->conn, LOG_PREFIX);
return std_dev_acquisition_stop_serial(sdi, cb_data, dev_close,
sdi->conn, LOG_PREFIX);
}
SR_PRIV struct sr_dev_driver flukedmm_driver_info = {

View File

@ -353,7 +353,7 @@ static int clear_instances(void)
static int init(struct sr_context *sr_ctx)
{
return std_hw_init(sr_ctx, di, LOG_PREFIX);
return std_init(sr_ctx, di, LOG_PREFIX);
}
static GSList *scan(GSList *options)

View File

@ -251,7 +251,7 @@ static int clear_instances(void)
static int init(struct sr_context *sr_ctx)
{
return std_hw_init(sr_ctx, di, LOG_PREFIX);
return std_init(sr_ctx, di, LOG_PREFIX);
}
static GSList *scan(GSList *options)

View File

@ -45,7 +45,7 @@ static int clear_instances(void)
static int init(struct sr_context *sr_ctx)
{
return std_hw_init(sr_ctx, di, LOG_PREFIX);
return std_init(sr_ctx, di, LOG_PREFIX);
}
static GSList *scan(GSList *options)

View File

@ -53,7 +53,7 @@ static struct sr_dev_driver *di = &link_mso19_driver_info;
static int init(struct sr_context *sr_ctx)
{
return std_hw_init(sr_ctx, di, LOG_PREFIX);
return std_init(sr_ctx, di, LOG_PREFIX);
}
static GSList *scan(GSList *options)

View File

@ -58,7 +58,7 @@ static int init(struct sr_context *sr_ctx, int idx)
{
sr_dbg("Selected '%s' subdriver.", mic_devs[idx].di->name);
return std_hw_init(sr_ctx, mic_devs[idx].di, LOG_PREFIX);
return std_init(sr_ctx, mic_devs[idx].di, LOG_PREFIX);
}
static GSList *mic_scan(const char *conn, const char *serialcomm, int idx)
@ -262,8 +262,8 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi,
static int dev_acquisition_stop(struct sr_dev_inst *sdi, void *cb_data)
{
return std_hw_dev_acquisition_stop_serial(sdi, cb_data, dev_close,
sdi->conn, LOG_PREFIX);
return std_dev_acquisition_stop_serial(sdi, cb_data, dev_close,
sdi->conn, LOG_PREFIX);
}
/* Driver-specific API function wrappers */

View File

@ -112,7 +112,7 @@ static int clear_instances(void)
static int init(struct sr_context *sr_ctx)
{
return std_hw_init(sr_ctx, di, LOG_PREFIX);
return std_init(sr_ctx, di, LOG_PREFIX);
}
static GSList *scan(GSList *options)

View File

@ -55,7 +55,7 @@ static struct sr_dev_driver *di = &ols_driver_info;
static int init(struct sr_context *sr_ctx)
{
return std_hw_init(sr_ctx, di, LOG_PREFIX);
return std_init(sr_ctx, di, LOG_PREFIX);
}
static GSList *scan(GSList *options)

View File

@ -178,7 +178,7 @@ static int set_cfg(const struct sr_dev_inst *sdi, const char *format, ...)
static int init(struct sr_context *sr_ctx)
{
return std_hw_init(sr_ctx, di, LOG_PREFIX);
return std_init(sr_ctx, di, LOG_PREFIX);
}
static int probe_port(const char *port, GSList **devices)

View File

@ -201,7 +201,7 @@ static int init(struct sr_context *sr_ctx, int dmm)
{
sr_dbg("Selected '%s' subdriver.", dmms[dmm].di->name);
return std_hw_init(sr_ctx, dmms[dmm].di, LOG_PREFIX);
return std_init(sr_ctx, dmms[dmm].di, LOG_PREFIX);
}
static GSList *sdmm_scan(const char *conn, const char *serialcomm, int dmm)
@ -445,8 +445,8 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi,
static int dev_acquisition_stop(struct sr_dev_inst *sdi, void *cb_data)
{
return std_hw_dev_acquisition_stop_serial(sdi, cb_data, dev_close,
sdi->conn, LOG_PREFIX);
return std_dev_acquisition_stop_serial(sdi, cb_data, dev_close,
sdi->conn, LOG_PREFIX);
}
/* Driver-specific API function wrappers */

View File

@ -47,7 +47,7 @@ static int clear_instances(void)
static int init(struct sr_context *sr_ctx)
{
return std_hw_init(sr_ctx, di, LOG_PREFIX);
return std_init(sr_ctx, di, LOG_PREFIX);
}
static GSList *scan(GSList *options)
@ -227,8 +227,8 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi,
static int dev_acquisition_stop(struct sr_dev_inst *sdi, void *cb_data)
{
return std_hw_dev_acquisition_stop_serial(sdi, cb_data, dev_close,
sdi->conn, LOG_PREFIX);
return std_dev_acquisition_stop_serial(sdi, cb_data, dev_close,
sdi->conn, LOG_PREFIX);
}
SR_PRIV struct sr_dev_driver tondaj_sl_814_driver_info = {

View File

@ -98,7 +98,7 @@ static int init(struct sr_context *sr_ctx, int dmm)
{
sr_dbg("Selected '%s' subdriver.", udmms[dmm].di->name);
return std_hw_init(sr_ctx, udmms[dmm].di, LOG_PREFIX);
return std_init(sr_ctx, udmms[dmm].di, LOG_PREFIX);
}
static GSList *scan(GSList *options, int dmm)

View File

@ -53,7 +53,7 @@ static int clear_instances(void)
static int init(struct sr_context *sr_ctx)
{
return std_hw_init(sr_ctx, di, LOG_PREFIX);
return std_init(sr_ctx, di, LOG_PREFIX);
}
static GSList *scan(GSList *options)

View File

@ -245,7 +245,7 @@ static int clear_instances(void)
static int init(struct sr_context *sr_ctx)
{
return std_hw_init(sr_ctx, di, "zeroplus: ");
return std_init(sr_ctx, di, LOG_PREFIX);
}
static GSList *scan(GSList *options)

View File

@ -125,9 +125,9 @@ SR_PRIV int sr_session_stop_sync(void);
typedef int (*dev_close_t)(struct sr_dev_inst *sdi);
typedef void (*std_dev_clear_t)(void *priv);
SR_PRIV int std_hw_init(struct sr_context *sr_ctx, struct sr_dev_driver *di,
SR_PRIV int std_init(struct sr_context *sr_ctx, struct sr_dev_driver *di,
const char *prefix);
SR_PRIV int std_hw_dev_acquisition_stop_serial(struct sr_dev_inst *sdi,
SR_PRIV int std_dev_acquisition_stop_serial(struct sr_dev_inst *sdi,
void *cb_data, dev_close_t dev_close_fn,
struct sr_serial_dev_inst *serial, const char *prefix);
SR_PRIV int std_session_send_df_header(const struct sr_dev_inst *sdi,

6
std.c
View File

@ -37,8 +37,8 @@
* @return SR_OK upon success, SR_ERR_ARG upon invalid arguments, or
* SR_ERR_MALLOC upon memory allocation errors.
*/
SR_PRIV int std_hw_init(struct sr_context *sr_ctx, struct sr_dev_driver *di,
const char *prefix)
SR_PRIV int std_init(struct sr_context *sr_ctx, struct sr_dev_driver *di,
const char *prefix)
{
struct drv_context *drvc;
@ -120,7 +120,7 @@ SR_PRIV int std_session_send_df_header(const struct sr_dev_inst *sdi,
* @return SR_OK upon success, SR_ERR_ARG upon invalid arguments, or
* SR_ERR upon other errors.
*/
SR_PRIV int std_hw_dev_acquisition_stop_serial(struct sr_dev_inst *sdi,
SR_PRIV int std_dev_acquisition_stop_serial(struct sr_dev_inst *sdi,
void *cb_data, dev_close_t dev_close_fn,
struct sr_serial_dev_inst *serial, const char *prefix)
{