X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=src%2Fhardware%2Fasix-sigma%2Fasix-sigma.c;h=e1355e9fb0f1240ddd20b2346910518da9b9617d;hb=98bfc4741f76b07e7db4c9628a6924004fc4fff4;hp=c577ca74686ca58268829c7c457efa35c339b08e;hpb=c368e6f3d248a73d69cd0c2c4a7c88a92def55e3;p=libsigrok.git diff --git a/src/hardware/asix-sigma/asix-sigma.c b/src/hardware/asix-sigma/asix-sigma.c index c577ca74..e1355e9f 100644 --- a/src/hardware/asix-sigma/asix-sigma.c +++ b/src/hardware/asix-sigma/asix-sigma.c @@ -325,7 +325,6 @@ static int init(struct sr_context *sr_ctx) static GSList *scan(GSList *options) { struct sr_dev_inst *sdi; - struct sr_channel *ch; struct drv_context *drvc; struct dev_context *devc; GSList *devices; @@ -383,11 +382,9 @@ static GSList *scan(GSList *options) sdi->model = g_strdup(USB_MODEL_NAME); sdi->driver = di; - for (i = 0; i < ARRAY_SIZE(channel_names); i++) { - ch = sr_channel_new(i, SR_CHANNEL_LOGIC, TRUE, + for (i = 0; i < ARRAY_SIZE(channel_names); i++) + sr_channel_new(sdi, i, SR_CHANNEL_LOGIC, TRUE, channel_names[i]); - sdi->channels = g_slist_append(sdi->channels, ch); - } devices = g_slist_append(devices, sdi); drvc->instances = g_slist_append(drvc->instances, sdi); @@ -446,7 +443,7 @@ static int sigma_fpga_init_bitbang(struct dev_context *devc) if (data & (1 << 5)) return 0; /* The D6 was not asserted yet, wait a bit. */ - usleep(10000); + g_usleep(10000); } return SR_ERR_TIMEOUT;