From: Uwe Hermann Date: Sat, 2 Jun 2018 21:23:55 +0000 (+0200) Subject: hantek-6xxx: Drop some unused variables. X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=1e99158c1bb933d3a910246d31962374e429a260;p=libsigrok.git hantek-6xxx: Drop some unused variables. --- diff --git a/src/hardware/hantek-6xxx/api.c b/src/hardware/hantek-6xxx/api.c index f8940d8f..d94ee45d 100644 --- a/src/hardware/hantek-6xxx/api.c +++ b/src/hardware/hantek-6xxx/api.c @@ -120,10 +120,6 @@ static struct sr_dev_inst *hantek_6xxx_dev_new(const struct hantek_6xxx_profile devc->coupling_tab_size = prof->coupling_tab_size; devc->has_coupling = prof->has_coupling; - devc->sample_buf = NULL; - devc->sample_buf_write = 0; - devc->sample_buf_size = 0; - devc->profile = prof; devc->dev_state = IDLE; devc->samplerate = DEFAULT_SAMPLERATE; @@ -637,7 +633,6 @@ static int read_channel(const struct sr_dev_inst *sdi, uint32_t amount) amount = MIN(amount, MAX_PACKET_SIZE); ret = hantek_6xxx_get_channeldata(sdi, receive_transfer, amount); devc->read_start_ts = g_get_monotonic_time(); - devc->read_data_amount = amount; return ret; } @@ -721,9 +716,6 @@ static int dev_acquisition_stop(struct sr_dev_inst *sdi) devc = sdi->priv; devc->dev_state = STOPPING; - g_free(devc->sample_buf); - devc->sample_buf = NULL; - return SR_OK; } diff --git a/src/hardware/hantek-6xxx/protocol.h b/src/hardware/hantek-6xxx/protocol.h index a106fb4b..af66c70e 100644 --- a/src/hardware/hantek-6xxx/protocol.h +++ b/src/hardware/hantek-6xxx/protocol.h @@ -122,11 +122,6 @@ struct dev_context { uint64_t aq_started; uint64_t read_start_ts; - uint32_t read_data_amount; - - struct libusb_transfer **sample_buf; - uint32_t sample_buf_write; - uint32_t sample_buf_size; gboolean ch_enabled[NUM_CHANNELS]; int voltage[NUM_CHANNELS];