{
unsigned int i;
- for (i = LINE6_ISO_BUFFERS; i--;) {
+ for (i = 0; i < LINE6_ISO_BUFFERS; i++) {
if (test_bit(i, &line6pcm->active_urb_in)) {
if (!test_and_set_bit(i, &line6pcm->unlink_urb_in)) {
struct urb *u = line6pcm->urb_audio_in[i];
do {
alive = 0;
- for (i = LINE6_ISO_BUFFERS; i--;) {
+ for (i = 0; i < LINE6_ISO_BUFFERS; i++) {
if (test_bit(i, &line6pcm->active_urb_in))
alive++;
}
int i;
struct snd_line6_pcm *line6pcm = snd_kcontrol_chip(kcontrol);
- for (i = 2; i--;)
+ for (i = 0; i < 2; i++)
ucontrol->value.integer.value[i] = line6pcm->volume_playback[i];
return 0;
int i, changed = 0;
struct snd_line6_pcm *line6pcm = snd_kcontrol_chip(kcontrol);
- for (i = 2; i--;)
+ for (i = 0; i < 2; i++)
if (line6pcm->volume_playback[i] !=
ucontrol->value.integer.value[i]) {
line6pcm->volume_playback[i] =
int i;
struct snd_line6_pcm *line6pcm = snd_pcm_chip(pcm);
- for (i = LINE6_ISO_BUFFERS; i--;) {
+ for (i = 0; i < LINE6_ISO_BUFFERS; i++) {
if (line6pcm->urb_audio_out[i]) {
usb_kill_urb(line6pcm->urb_audio_out[i]);
usb_free_urb(line6pcm->urb_audio_out[i]);
{
unsigned int i;
- for (i = LINE6_ISO_BUFFERS; i--;) {
+ for (i = 0; i < LINE6_ISO_BUFFERS; i++) {
if (test_bit(i, &line6pcm->active_urb_out)) {
if (!test_and_set_bit(i, &line6pcm->unlink_urb_out)) {
struct urb *u = line6pcm->urb_audio_out[i];
do {
alive = 0;
- for (i = LINE6_ISO_BUFFERS; i--;) {
+ for (i = 0; i < LINE6_ISO_BUFFERS; i++) {
if (test_bit(i, &line6pcm->active_urb_out))
alive++;
}
line6pcm->last_frame_out = urb->start_frame;
/* find index of URB */
- for (index = LINE6_ISO_BUFFERS; index--;)
+ for (index = 0; index < LINE6_ISO_BUFFERS; index++)
if (urb == line6pcm->urb_audio_out[index])
break;
- if (index < 0)
+ if (index >= LINE6_ISO_BUFFERS)
return; /* URB has been unlinked asynchronously */
- for (i = LINE6_ISO_PACKETS; i--;)
+ for (i = 0; i < LINE6_ISO_PACKETS; i++)
length += urb->iso_frame_desc[i].length;
spin_lock_irqsave(&line6pcm->lock_audio_out, flags);
clear_bit(index, &line6pcm->active_urb_out);
- for (i = LINE6_ISO_PACKETS; i--;)
+ for (i = 0; i < LINE6_ISO_PACKETS; i++)
if (urb->iso_frame_desc[i].status == -EXDEV) {
shutdown = 1;
break;