summaryrefslogtreecommitdiffstats
path: root/sound/usb/fcp.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2025-01-21 18:00:29 +0100
committerTakashi Iwai <tiwai@suse.de>2025-01-21 18:01:26 +0100
commite7217011ddd8e86a0d18c6cbfb4f14da3d18eee0 (patch)
treedaeeb8e0a9601f375c332a86264f42c0e24d384d /sound/usb/fcp.c
parentALSA: hda/realtek: Enable Mute LED on HP Laptop 14s-fq1xxx (diff)
downloadlinux-e7217011ddd8e86a0d18c6cbfb4f14da3d18eee0.tar.xz
linux-e7217011ddd8e86a0d18c6cbfb4f14da3d18eee0.zip
ALSA: usb: fcp: Fix meter_levels type to __le32
The cached level meter values are returned from the USB core as __le32, hence declare properly. Fixes: 46757a3e7d50 ("ALSA: FCP: Add Focusrite Control Protocol driver") Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202501212331.SaePSmsA-lkp@intel.com/ Link: https://patch.msgid.link/20250121170032.7236-2-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to '')
-rw-r--r--sound/usb/fcp.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sound/usb/fcp.c b/sound/usb/fcp.c
index ecdd18335ab7..92e3caab0b82 100644
--- a/sound/usb/fcp.c
+++ b/sound/usb/fcp.c
@@ -100,7 +100,7 @@ struct fcp_data {
u8 num_meter_slots;
s16 *meter_level_map;
- u32 *meter_levels;
+ __le32 *meter_levels;
struct snd_kcontrol *meter_ctl;
unsigned int *meter_labels_tlv;
@@ -383,7 +383,7 @@ static int fcp_meter_ctl_get(struct snd_kcontrol *kctl,
struct usb_mixer_interface *mixer = elem->head.mixer;
struct fcp_data *private = mixer->private_data;
int num_meter_slots, resp_size;
- u32 *resp = private->meter_levels;
+ __le32 *resp = private->meter_levels;
int i, err = 0;
struct {
@@ -655,7 +655,7 @@ static int fcp_ioctl_set_meter_map(struct usb_mixer_interface *mixer,
/* If the control doesn't exist, create it */
if (!private->meter_ctl) {
s16 *new_map __free(kfree) = NULL;
- u32 *meter_levels __free(kfree) = NULL;
+ __le32 *meter_levels __free(kfree) = NULL;
/* Allocate buffer for the map */
new_map = kmalloc_array(map.map_size, sizeof(s16), GFP_KERNEL);
@@ -663,7 +663,7 @@ static int fcp_ioctl_set_meter_map(struct usb_mixer_interface *mixer,
return -ENOMEM;
/* Allocate buffer for reading meter levels */
- meter_levels = kmalloc_array(map.meter_slots, sizeof(u32),
+ meter_levels = kmalloc_array(map.meter_slots, sizeof(__le32),
GFP_KERNEL);
if (!meter_levels)
return -ENOMEM;