From: Bert Vermeulen Date: Fri, 3 Aug 2012 11:50:31 +0000 (+0200) Subject: chronovu-la8: code cleanup X-Git-Tag: dsupstream~733 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=afc88319384053b3f2ca4b17706c10ded9c7174b;p=libsigrok.git chronovu-la8: code cleanup --- diff --git a/hardware/chronovu-la8/api.c b/hardware/chronovu-la8/api.c index ee535fc2..5b5d3c7b 100644 --- a/hardware/chronovu-la8/api.c +++ b/hardware/chronovu-la8/api.c @@ -253,7 +253,6 @@ static int hw_dev_close(struct sr_dev_inst *sdi) if (sdi->status == SR_ST_ACTIVE) { sr_dbg("la8: Status ACTIVE, closing device."); - /* TODO: Really ignore errors here, or return SR_ERR? */ (void) la8_close_usb_reset_sequencer(devc); /* Ignore errors. */ } else { sr_spew("la8: Status not ACTIVE, nothing to do."); @@ -418,7 +417,6 @@ static int receive_data(int fd, int revents, void *cb_data) hw_dev_acquisition_stop(sdi, sdi); - // return FALSE; /* FIXME? */ return TRUE; } @@ -464,7 +462,7 @@ static int hw_dev_acquisition_start(const struct sr_dev_inst *sdi, return SR_ERR; } else if (bytes_written != 4) { sr_err("la8: Acquisition failed to start."); - return SR_ERR; /* TODO: Other error and return code? */ + return SR_ERR; } sr_dbg("la8: Acquisition started successfully."); @@ -501,18 +499,13 @@ static int hw_dev_acquisition_start(const struct sr_dev_inst *sdi, static int hw_dev_acquisition_stop(const struct sr_dev_inst *sdi, void *cb_data) { - struct dev_context *devc; struct sr_datafeed_packet packet; - sr_dbg("la8: Stopping acquisition."); + (void)sdi; + sr_dbg("la8: Stopping acquisition."); sr_source_remove(-1); - if (!(devc = sdi->priv)) { - sr_err("la8: %s: sdi->priv was NULL", __func__); - return SR_ERR_BUG; - } - /* Send end packet to the session bus. */ sr_dbg("la8: Sending SR_DF_END."); packet.type = SR_DF_END;