Skip to content

Commit 5c29308

Browse files
geoffreybennetttiwai
authored andcommitted
ALSA: scarlett2: Fix mixed declarations and code warning
In scarlett2_compressor_ctl_put(), move the declaration of param to the beginning of the function to avoid mixed declarations and code. Signed-off-by: Geoffrey D. Bennett <[email protected]> Signed-off-by: Takashi Iwai <[email protected]> Link: https://patch.msgid.link/[email protected]
1 parent 5e7b782 commit 5c29308

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sound/usb/mixer_scarlett2.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5385,6 +5385,8 @@ static int scarlett2_compressor_ctl_put(
53855385
int index = elem->control;
53865386
int channel = index / SCARLETT2_COMPRESSOR_PARAM_COUNT;
53875387
int param_index = index % SCARLETT2_COMPRESSOR_PARAM_COUNT;
5388+
const struct compressor_param *param = &compressor_params[param_index];
5389+
53885390
int oval, val, err;
53895391
s32 scaled_val;
53905392

@@ -5406,8 +5408,6 @@ static int scarlett2_compressor_ctl_put(
54065408

54075409
private->compressor_values[index] = val;
54085410

5409-
const struct compressor_param *param = &compressor_params[param_index];
5410-
54115411
scaled_val = val << param->scale_bits;
54125412

54135413
/* Send change to the device */

0 commit comments

Comments
 (0)