]> sigrok.org Git - libsigrok.git/commitdiff
Drop some unused or duplicated code.
authorUwe Hermann <redacted>
Sat, 23 Apr 2016 18:59:38 +0000 (20:59 +0200)
committerUwe Hermann <redacted>
Fri, 29 Apr 2016 17:26:17 +0000 (19:26 +0200)
src/hardware/gmc-mh-1x-2x/api.c
src/hardware/motech-lps-30x/api.c
src/hardware/scpi-pps/api.c
src/hardware/zeroplus-logic-cube/api.c

index 15bf7f9f4845021adcea0bb6d4578ff172fb5fe2..28927fc53d58247850e0e4308f63d9677af29412 100644 (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;
 
index cee97b575f909fee37ae44832a5fe9a267a95629..7f9c33f68d43943fb0fc47cdf6394bb2fe3b61cb 100644 (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();
 
index 112bedc0e25b13712123d21fbec6ea3d3d2fd86e..10ab5f9e8335147bae53ad3b804490f073590893 100644 (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) {
index 22ec33b544ac3d8218b9bb0fe960d3254f63cd0e..c85a40892b69a297317d67c6267bfe0552c3f4d9 100644 (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. */