};
static struct sr_dev_inst *probe_device(struct sr_scpi_dev_inst *scpi,
- int (*get_hw_id)(struct sr_scpi_dev_inst *scpi,
- struct sr_scpi_hw_info **scpi_response)
- )
+ int (*get_hw_id)(struct sr_scpi_dev_inst *scpi,
+ struct sr_scpi_hw_info **scpi_response))
{
struct dev_context *devc;
struct sr_dev_inst *sdi;
struct sr_scpi_dev_inst *scpi;
struct dev_context *devc;
- if (sdi->status != SR_ST_ACTIVE)
- return SR_ERR_DEV_CLOSED;
-
devc = sdi->priv;
scpi = sdi->conn;
if (scpi) {
if (!sdi)
return SR_ERR_ARG;
- if (sdi->status != SR_ST_ACTIVE)
- return SR_ERR_DEV_CLOSED;
-
if (cg)
/* Channel group specified. */
select_channel(sdi, cg->channels->data);
struct pps_channel *pch;
int cmd, ret;
- if (sdi->status != SR_ST_ACTIVE)
- return SR_ERR_DEV_CLOSED;
-
devc = sdi->priv;
scpi = sdi->conn;
if ((ret = sr_scpi_source_add(sdi->session, scpi, G_IO_IN, 10,
scpi_pps_receive_data, (void *)sdi)) != SR_OK)
return ret;
- std_session_send_df_header(sdi, LOG_PREFIX);
+ std_session_send_df_header(sdi);
/* Prime the pipe with the first channel's fetch. */
ch = sr_next_enabled_channel(sdi, NULL);
struct sr_scpi_dev_inst *scpi;
float f;
- if (sdi->status != SR_ST_ACTIVE)
- return SR_ERR_DEV_CLOSED;
-
scpi = sdi->conn;
/*
sr_scpi_get_float(scpi, NULL, &f);
sr_scpi_source_remove(sdi->session, scpi);
- std_session_send_df_end(sdi, LOG_PREFIX);
+ std_session_send_df_end(sdi);
return SR_OK;
}