summaryrefslogtreecommitdiffstats
path: root/sound/usb
diff options
context:
space:
mode:
authorJaroslav Kysela <perex@perex.cz>2010-02-16 11:55:18 +0100
committerJaroslav Kysela <perex@perex.cz>2010-02-16 12:00:45 +0100
commit291186e049d7f8178ad31d43c38a53889f25d79e (patch)
treeeb162af2ac0bacdcd7a4aea4bb57132e1bff9165 /sound/usb
parent7affdc17d49b5d9e9c350d5d99ee34ab8655c7b4 (diff)
downloadlinux-291186e049d7f8178ad31d43c38a53889f25d79e.tar.bz2
ALSA: usbmixer - use MAX_ID_ELEMS where possible
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Diffstat (limited to 'sound/usb')
-rw-r--r--sound/usb/usbmixer.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sound/usb/usbmixer.c b/sound/usb/usbmixer.c
index 03f125dca5ff..35b4830fb0c4 100644
--- a/sound/usb/usbmixer.c
+++ b/sound/usb/usbmixer.c
@@ -108,7 +108,7 @@ struct mixer_build {
struct usb_mixer_interface *mixer;
unsigned char *buffer;
unsigned int buflen;
- DECLARE_BITMAP(unitbitmap, 256);
+ DECLARE_BITMAP(unitbitmap, MAX_ID_ELEMS);
struct usb_audio_term oterm;
const struct usbmix_name_map *map;
const struct usbmix_selector_map *selector_map;
@@ -2265,7 +2265,8 @@ int snd_usb_create_mixer(struct snd_usb_audio *chip, int ctrlif,
mixer->chip = chip;
mixer->ctrlif = ctrlif;
mixer->ignore_ctl_error = ignore_error;
- mixer->id_elems = kcalloc(256, sizeof(*mixer->id_elems), GFP_KERNEL);
+ mixer->id_elems = kcalloc(MAX_ID_ELEMS, sizeof(*mixer->id_elems),
+ GFP_KERNEL);
if (!mixer->id_elems) {
kfree(mixer);
return -ENOMEM;