From: Bert Vermeulen Date: Wed, 4 Dec 2013 23:16:11 +0000 (+0100) Subject: scpi/usbtmc: Prototype fixes. X-Git-Tag: libsigrok-0.3.0~480 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=91e406b9210b2b2c009e9ef8662d2634e5b6e997;p=libsigrok.git scpi/usbtmc: Prototype fixes. --- diff --git a/hardware/common/scpi_usbtmc.c b/hardware/common/scpi_usbtmc.c index f7f0958e..9648722c 100644 --- a/hardware/common/scpi_usbtmc.c +++ b/hardware/common/scpi_usbtmc.c @@ -111,7 +111,7 @@ SR_PRIV int scpi_usbtmc_receive(void *priv, char **scpi_response) return SR_OK; } -SR_PRIV int scpi_usbtmc_read(void *priv, unsigned char *buf, int maxlen) +SR_PRIV int scpi_usbtmc_read(void *priv, char *buf, int maxlen) { struct sr_usbtmc_dev_inst *usbtmc = priv; int len; @@ -136,6 +136,11 @@ SR_PRIV int scpi_usbtmc_close(void *priv) return SR_OK; } +static void scpi_usbtmc_free(void *priv) +{ + return sr_usbtmc_dev_inst_free(priv); +} + SR_PRIV struct sr_scpi_dev_inst *scpi_usbtmc_dev_inst_new(const char *device) { struct sr_scpi_dev_inst *scpi; @@ -156,7 +161,7 @@ SR_PRIV struct sr_scpi_dev_inst *scpi_usbtmc_dev_inst_new(const char *device) scpi->receive = scpi_usbtmc_receive; scpi->read = scpi_usbtmc_read; scpi->close = scpi_usbtmc_close; - scpi->free = sr_usbtmc_dev_inst_free; + scpi->free = scpi_usbtmc_free; scpi->priv = usbtmc; return scpi;