X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fhardware%2Fgwinstek-gpd%2Fapi.c;h=7406460623fe4d55d53542106c60f68629398e6d;hb=cb828f1b3e00;hp=79688afb6595f7efacfde7df6c8e1c868cea96fd;hpb=eaa8c6597b880d018731c36922ed4013e34813e1;p=libsigrok.git diff --git a/src/hardware/gwinstek-gpd/api.c b/src/hardware/gwinstek-gpd/api.c index 79688afb..74064606 100644 --- a/src/hardware/gwinstek-gpd/api.c +++ b/src/hardware/gwinstek-gpd/api.c @@ -107,7 +107,6 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options) if (serial_open(serial, SERIAL_RDWR) != SR_OK) return NULL; - serial_flush(serial); gpd_send_cmd(serial, "*IDN?\n"); if (gpd_receive_reply(serial, reply, sizeof(reply)) != SR_OK) { sr_err("Device did not reply."); @@ -220,7 +219,7 @@ error: static int config_get(uint32_t key, GVariant **data, const struct sr_dev_inst *sdi, const struct sr_channel_group *cg) { - int ret, channel; + int channel; const struct dev_context *devc; const struct sr_channel *ch; @@ -244,7 +243,6 @@ static int config_get(uint32_t key, GVariant **data, } else { ch = cg->channels->data; channel = ch->index; - ret = SR_OK; switch (key) { case SR_CONF_VOLTAGE: *data = g_variant_new_double( @@ -267,7 +265,7 @@ static int config_get(uint32_t key, GVariant **data, } } - return ret; + return SR_OK; } static int config_set(uint32_t key, GVariant *data, @@ -384,7 +382,7 @@ static int dev_acquisition_start(const struct sr_dev_inst *sdi) return SR_OK; } -SR_PRIV const struct sr_dev_driver gwinstek_gpd_driver_info = { +static struct sr_dev_driver gwinstek_gpd_driver_info = { .name = "gwinstek-gpd", .longname = "GW Instek GPD", .api_version = 1,