X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fbaylibre-acme%2Fapi.c;h=c116cbbb6ef10ec1f105a33f3f77753aa63b6ffa;hb=803db07a1af036a5da65581ddbac23b7f84a4388;hp=72e8f345b870d04d35a52cd6994eabc225bbdcb9;hpb=7a1a3a36a98eda90c2fe4a78326ea68afe94a041;p=libsigrok.git diff --git a/src/hardware/baylibre-acme/api.c b/src/hardware/baylibre-acme/api.c index 72e8f345..c116cbbb 100644 --- a/src/hardware/baylibre-acme/api.c +++ b/src/hardware/baylibre-acme/api.c @@ -17,6 +17,7 @@ * along with this program. If not, see . */ +#include #include "protocol.h" #include #include @@ -68,7 +69,7 @@ static GSList *scan(struct sr_dev_driver *di, GSList *options) (void)options; - drvc = di->priv; + drvc = di->context; devices = NULL; devc = g_malloc0(sizeof(struct dev_context)); @@ -143,7 +144,7 @@ err_out: static GSList *dev_list(const struct sr_dev_driver *di) { - return ((struct drv_context *)(di->priv))->instances; + return ((struct drv_context *)(di->context))->instances; } static int dev_clear(const struct sr_dev_driver *di) @@ -415,14 +416,13 @@ static int dev_acquisition_stop(struct sr_dev_inst *sdi, void *cb_data) g_io_channel_shutdown(devc->channel, FALSE, NULL); g_io_channel_unref(devc->channel); devc->channel = NULL; - close(devc->timer_fd); /* Send last packet. */ packet.type = SR_DF_END; sr_session_send(sdi, &packet); if (devc->samples_missed > 0) - sr_warn("%d samples missed", devc->samples_missed); + sr_warn("%" PRIu64 " samples missed", devc->samples_missed); return SR_OK; } @@ -443,5 +443,5 @@ SR_PRIV struct sr_dev_driver baylibre_acme_driver_info = { .dev_close = dev_close, .dev_acquisition_start = dev_acquisition_start, .dev_acquisition_stop = dev_acquisition_stop, - .priv = NULL, + .context = NULL, };