From 91e406b9210b2b2c009e9ef8662d2634e5b6e997 Mon Sep 17 00:00:00 2001 From: Bert Vermeulen Date: Thu, 5 Dec 2013 00:16:11 +0100 Subject: [PATCH] scpi/usbtmc: Prototype fixes. --- hardware/common/scpi_usbtmc.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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;