]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
ALSA: scarlett2: Fix redeclaration of loop variable
authorGeoffrey D. Bennett <g@b4.vu>
Fri, 4 Oct 2024 14:27:54 +0000 (23:57 +0930)
committerTakashi Iwai <tiwai@suse.de>
Tue, 8 Oct 2024 08:11:48 +0000 (10:11 +0200)
Was using both "for (i = 0, ..." and "for (int i = 0, ..." in
scarlett2_update_autogain(). Remove "int" to fix.

Signed-off-by: Geoffrey D. Bennett <g@b4.vu>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/ecb0a8931c1883abd6c0e335c63961653bef85f0.1727971672.git.g@b4.vu
sound/usb/mixer_scarlett2.c

index 1150cf104985ceaa51372bc1d606d0d7c6bda51c..003e91f9e43c775259b1015be6c550fc268c49ac 100644 (file)
@@ -3409,7 +3409,7 @@ static int scarlett2_update_autogain(struct usb_mixer_interface *mixer)
                                private->num_autogain_status_texts - 1;
 
 
-       for (int i = 0; i < SCARLETT2_AG_TARGET_COUNT; i++)
+       for (i = 0; i < SCARLETT2_AG_TARGET_COUNT; i++)
                if (scarlett2_has_config_item(private,
                                              scarlett2_ag_target_configs[i])) {
                        err = scarlett2_usb_get_config(
@@ -3420,7 +3420,7 @@ static int scarlett2_update_autogain(struct usb_mixer_interface *mixer)
                }
 
        /* convert from negative dBFS as used by the device */
-       for (int i = 0; i < SCARLETT2_AG_TARGET_COUNT; i++)
+       for (i = 0; i < SCARLETT2_AG_TARGET_COUNT; i++)
                private->ag_targets[i] = -ag_target_values[i];
 
        return 0;