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.
This commit is contained in:
Daniel Elstner 2015-06-24 19:16:49 +02:00 committed by Uwe Hermann
parent a93086528e
commit fe473123ba
1 changed files with 3 additions and 3 deletions

View File

@ -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;