diff options
Diffstat (limited to 'sound/usb/mixer_quirks.c')
-rw-r--r-- | sound/usb/mixer_quirks.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sound/usb/mixer_quirks.c b/sound/usb/mixer_quirks.c index f119a41ed9a9..8c9bf4b7aaf0 100644 --- a/sound/usb/mixer_quirks.c +++ b/sound/usb/mixer_quirks.c | |||
@@ -593,10 +593,10 @@ static int snd_nativeinstruments_control_get(struct snd_kcontrol *kcontrol, | |||
593 | if (mixer->chip->shutdown) | 593 | if (mixer->chip->shutdown) |
594 | ret = -ENODEV; | 594 | ret = -ENODEV; |
595 | else | 595 | else |
596 | ret = usb_control_msg(dev, usb_rcvctrlpipe(dev, 0), bRequest, | 596 | ret = snd_usb_ctl_msg(dev, usb_rcvctrlpipe(dev, 0), bRequest, |
597 | USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_IN, | 597 | USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_IN, |
598 | 0, wIndex, | 598 | 0, wIndex, |
599 | &tmp, sizeof(tmp), 1000); | 599 | &tmp, sizeof(tmp)); |
600 | up_read(&mixer->chip->shutdown_rwsem); | 600 | up_read(&mixer->chip->shutdown_rwsem); |
601 | 601 | ||
602 | if (ret < 0) { | 602 | if (ret < 0) { |
@@ -885,6 +885,11 @@ static int snd_ftu_eff_switch_put(struct snd_kcontrol *kctl, | |||
885 | return changed; | 885 | return changed; |
886 | } | 886 | } |
887 | 887 | ||
888 | static void kctl_private_value_free(struct snd_kcontrol *kctl) | ||
889 | { | ||
890 | kfree((void *)kctl->private_value); | ||
891 | } | ||
892 | |||
888 | static int snd_ftu_create_effect_switch(struct usb_mixer_interface *mixer, | 893 | static int snd_ftu_create_effect_switch(struct usb_mixer_interface *mixer, |
889 | int validx, int bUnitID) | 894 | int validx, int bUnitID) |
890 | { | 895 | { |
@@ -919,6 +924,7 @@ static int snd_ftu_create_effect_switch(struct usb_mixer_interface *mixer, | |||
919 | return -ENOMEM; | 924 | return -ENOMEM; |
920 | } | 925 | } |
921 | 926 | ||
927 | kctl->private_free = kctl_private_value_free; | ||
922 | err = snd_ctl_add(mixer->chip->card, kctl); | 928 | err = snd_ctl_add(mixer->chip->card, kctl); |
923 | if (err < 0) | 929 | if (err < 0) |
924 | return err; | 930 | return err; |