Drop some unused or duplicated code.
This commit is contained in:
parent
8f878dc6aa
commit
c50805d59c
|
@ -291,7 +291,6 @@ static GSList *scan_2x_bd232(struct sr_dev_driver *di, GSList *options)
|
||||||
|
|
||||||
/* Send message 03 "Query multimeter version and status" */
|
/* Send message 03 "Query multimeter version and status" */
|
||||||
sdi->conn = serial;
|
sdi->conn = serial;
|
||||||
sdi->priv = devc;
|
|
||||||
if (req_stat14(sdi, TRUE) != SR_OK)
|
if (req_stat14(sdi, TRUE) != SR_OK)
|
||||||
goto exit_err;
|
goto exit_err;
|
||||||
|
|
||||||
|
|
|
@ -242,7 +242,7 @@ SR_PRIV int lps_process_status(struct sr_dev_inst *sdi, int stat)
|
||||||
struct dev_context *devc;
|
struct dev_context *devc;
|
||||||
int tracking_mode;
|
int tracking_mode;
|
||||||
|
|
||||||
devc = (struct dev_context *)sdi->priv;
|
devc = sdi->priv;
|
||||||
|
|
||||||
sr_spew("Status: %d", stat);
|
sr_spew("Status: %d", stat);
|
||||||
devc->channel_status[0].cc_mode = (stat & 0x01) != 0;
|
devc->channel_status[0].cc_mode = (stat & 0x01) != 0;
|
||||||
|
@ -289,7 +289,7 @@ SR_PRIV int lps_query_status(struct sr_dev_inst *sdi)
|
||||||
int stat, ret;
|
int stat, ret;
|
||||||
struct dev_context *devc;
|
struct dev_context *devc;
|
||||||
|
|
||||||
devc = (struct dev_context *)sdi->priv;
|
devc = sdi->priv;
|
||||||
|
|
||||||
devc->req_sent_at = g_get_real_time();
|
devc->req_sent_at = g_get_real_time();
|
||||||
|
|
||||||
|
|
|
@ -203,7 +203,6 @@ static int dev_open(struct sr_dev_inst *sdi)
|
||||||
|
|
||||||
devc = sdi->priv;
|
devc = sdi->priv;
|
||||||
scpi_cmd(sdi, devc->device->commands, SCPI_CMD_REMOTE);
|
scpi_cmd(sdi, devc->device->commands, SCPI_CMD_REMOTE);
|
||||||
devc = sdi->priv;
|
|
||||||
devc->beeper_was_set = FALSE;
|
devc->beeper_was_set = FALSE;
|
||||||
if (scpi_cmd_resp(sdi, devc->device->commands, &beeper,
|
if (scpi_cmd_resp(sdi, devc->device->commands, &beeper,
|
||||||
G_VARIANT_TYPE_BOOLEAN, SCPI_CMD_BEEPER) == SR_OK) {
|
G_VARIANT_TYPE_BOOLEAN, SCPI_CMD_BEEPER) == SR_OK) {
|
||||||
|
|
|
@ -694,16 +694,10 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi)
|
||||||
/* TODO: This stops acquisition on ALL devices, ignoring dev_index. */
|
/* TODO: This stops acquisition on ALL devices, ignoring dev_index. */
|
||||||
static int dev_acquisition_stop(struct sr_dev_inst *sdi)
|
static int dev_acquisition_stop(struct sr_dev_inst *sdi)
|
||||||
{
|
{
|
||||||
struct dev_context *devc;
|
|
||||||
struct sr_usb_dev_inst *usb;
|
struct sr_usb_dev_inst *usb;
|
||||||
|
|
||||||
std_session_send_df_end(sdi, LOG_PREFIX);
|
std_session_send_df_end(sdi, LOG_PREFIX);
|
||||||
|
|
||||||
if (!(devc = sdi->priv)) {
|
|
||||||
sr_err("%s: sdi->priv was NULL", __func__);
|
|
||||||
return SR_ERR_BUG;
|
|
||||||
}
|
|
||||||
|
|
||||||
usb = sdi->conn;
|
usb = sdi->conn;
|
||||||
analyzer_reset(usb->devhdl);
|
analyzer_reset(usb->devhdl);
|
||||||
/* TODO: Need to cancel and free any queued up transfers. */
|
/* TODO: Need to cancel and free any queued up transfers. */
|
||||||
|
|
Loading…
Reference in New Issue