|
@@ -5059,8 +5059,7 @@ static int ca0132_alt_svm_setting_put(struct snd_kcontrol *kcontrol,
|
|
|
static int ca0132_alt_eq_preset_info(struct snd_kcontrol *kcontrol,
|
|
|
struct snd_ctl_elem_info *uinfo)
|
|
|
{
|
|
|
- unsigned int items = sizeof(ca0132_alt_eq_presets)
|
|
|
- / sizeof(struct ct_eq_preset);
|
|
|
+ unsigned int items = ARRAY_SIZE(ca0132_alt_eq_presets);
|
|
|
|
|
|
uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED;
|
|
|
uinfo->count = 1;
|
|
@@ -5089,8 +5088,7 @@ static int ca0132_alt_eq_preset_put(struct snd_kcontrol *kcontrol,
|
|
|
struct ca0132_spec *spec = codec->spec;
|
|
|
int i, err = 0;
|
|
|
int sel = ucontrol->value.enumerated.item[0];
|
|
|
- unsigned int items = sizeof(ca0132_alt_eq_presets)
|
|
|
- / sizeof(struct ct_eq_preset);
|
|
|
+ unsigned int items = ARRAY_SIZE(ca0132_alt_eq_presets);
|
|
|
|
|
|
if (sel >= items)
|
|
|
return 0;
|