11 Nov
2014
11 Nov
'14
8:20 a.m.
At Tue, 11 Nov 2014 11:20:16 +1100, Damien Zammit wrote:
+static int snd_mbox1_switch_put(struct snd_kcontrol *kctl,
struct snd_ctl_elem_value *ucontrol)
+{
- struct snd_usb_audio *chip;
- struct usb_mixer_interface *mixer;
- int err;
- bool cur_val, new_val;
- unsigned char buff[3];
- cur_val = kctl->private_value;
- new_val = ucontrol->value.enumerated.item[0];
- mixer = snd_kcontrol_chip(kctl);
- if (snd_BUG_ON(!mixer))
return -EINVAL;
- chip = mixer->chip;
- if (snd_BUG_ON(!chip))
return -EINVAL;
- if (cur_val != new_val)
return 0;
This should be "cur_val == new_val" (no change, just return).
Takashi