Drop some unused or duplicated code.

This commit is contained in:
Uwe Hermann 2016-04-23 20:59:38 +02:00
parent 8f878dc6aa
commit c50805d59c
4 changed files with 2 additions and 10 deletions

View File

@ -291,7 +291,6 @@ static GSList *scan_2x_bd232(struct sr_dev_driver *di, GSList *options)
/* Send message 03 "Query multimeter version and status" */
sdi->conn = serial;
sdi->priv = devc;
if (req_stat14(sdi, TRUE) != SR_OK)
goto exit_err;

View File

@ -242,7 +242,7 @@ SR_PRIV int lps_process_status(struct sr_dev_inst *sdi, int stat)
struct dev_context *devc;
int tracking_mode;
devc = (struct dev_context *)sdi->priv;
devc = sdi->priv;
sr_spew("Status: %d", stat);
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;
struct dev_context *devc;
devc = (struct dev_context *)sdi->priv;
devc = sdi->priv;
devc->req_sent_at = g_get_real_time();

View File

@ -203,7 +203,6 @@ static int dev_open(struct sr_dev_inst *sdi)
devc = sdi->priv;
scpi_cmd(sdi, devc->device->commands, SCPI_CMD_REMOTE);
devc = sdi->priv;
devc->beeper_was_set = FALSE;
if (scpi_cmd_resp(sdi, devc->device->commands, &beeper,
G_VARIANT_TYPE_BOOLEAN, SCPI_CMD_BEEPER) == SR_OK) {

View File

@ -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. */
static int dev_acquisition_stop(struct sr_dev_inst *sdi)
{
struct dev_context *devc;
struct sr_usb_dev_inst *usb;
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;
analyzer_reset(usb->devhdl);
/* TODO: Need to cancel and free any queued up transfers. */