X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fbaylibre-acme%2Fprotocol.c;h=461a7b5e4dc10392292a796bdacf9caf45f97a46;hb=98bfc4741f76b07e7db4c9628a6924004fc4fff4;hp=66a22ad4ffe0e93b4f2f0bcd9017dc3c80e0a7f9;hpb=391e23a97fe5b919f7f0716702bd1b151c601f66;p=libsigrok.git diff --git a/src/hardware/baylibre-acme/protocol.c b/src/hardware/baylibre-acme/protocol.c index 66a22ad4..461a7b5e 100644 --- a/src/hardware/baylibre-acme/protocol.c +++ b/src/hardware/baylibre-acme/protocol.c @@ -201,13 +201,12 @@ static void append_channel(struct sr_dev_inst *sdi, struct sr_channel_group *cg, cp->ch_type = type; cp->probe = cg->priv; - ch = sr_channel_new(devc->num_channels++, + ch = sr_channel_new(sdi, devc->num_channels++, SR_CHANNEL_ANALOG, TRUE, name); g_free(name); ch->priv = cp; cg->channels = g_slist_append(cg->channels, ch); - sdi->channels = g_slist_append(sdi->channels, ch); } SR_PRIV gboolean bl_acme_register_probe(struct sr_dev_inst *sdi, int type, @@ -334,11 +333,7 @@ SR_PRIV int bl_acme_set_shunt(const struct sr_channel_group *cg, uint64_t shunt) } g_string_free(path, TRUE); - g_fprintf(fd, "%llu\n", MOHM_TO_UOHM(shunt)); - /* - * XXX There's no g_fclose() in GLib. This seems to work, - * but is it safe? - */ + g_fprintf(fd, "%" PRIu64 "\n", MOHM_TO_UOHM(shunt)); fclose(fd); out: