From fe473123ba836445d477149f2e2c0ae372fc0c4c Mon Sep 17 00:00:00 2001 From: Daniel Elstner Date: Wed, 24 Jun 2015 19:16:49 +0200 Subject: [PATCH] sysclk-lwla: Do not create channels in reverse order This was originally done as an optimization in combination with a list reversal which has since been removed from the code. Thus, un-reverse the channels so that the UI lists them in the correct order again. --- src/hardware/sysclk-lwla/api.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/hardware/sysclk-lwla/api.c b/src/hardware/sysclk-lwla/api.c index 066f914d..1d68ba4a 100644 --- a/src/hardware/sysclk-lwla/api.c +++ b/src/hardware/sysclk-lwla/api.c @@ -100,10 +100,10 @@ static struct sr_dev_inst *dev_inst_new(void) devc->samplerate = DEFAULT_SAMPLERATE; sdi->priv = devc; - for (i = NUM_CHANNELS; i > 0; --i) { + for (i = 0; i < NUM_CHANNELS; ++i) { /* The LWLA series simply number channels from CH1 to CHxx. */ - g_snprintf(name, sizeof(name), "CH%d", i); - sr_channel_new(sdi, i - 1, SR_CHANNEL_LOGIC, TRUE, name); + g_snprintf(name, sizeof(name), "CH%d", i + 1); + sr_channel_new(sdi, i, SR_CHANNEL_LOGIC, TRUE, name); } return sdi;