summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOliver Neukum <oneukum@suse.com>2020-09-23 16:43:37 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-09-25 17:33:58 +0300
commitc31db08301277e23ab7366bd4cdfb212ac1a7cca (patch)
tree61e3d053a88ff9849a64fab5e92e5f9893830cf3
parentcad874c4a234512bfcd81139d6fe935dee5ce7dc (diff)
downloadlinux-c31db08301277e23ab7366bd4cdfb212ac1a7cca.tar.xz
Revert "sound: hiface: move to use usb_control_msg_send()"
This reverts commit 119ae38a5cdfbefdf926b34fbf65cd60dc82c95e. The API has to be changed. Signed-off-by: Oliver Neukum <oneukum@suse.com> Link: https://lore.kernel.org/r/20200923134348.23862-4-oneukum@suse.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--sound/usb/hiface/pcm.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/sound/usb/hiface/pcm.c b/sound/usb/hiface/pcm.c
index f9c924e3964e..a148caa5f48e 100644
--- a/sound/usb/hiface/pcm.c
+++ b/sound/usb/hiface/pcm.c
@@ -156,14 +156,16 @@ static int hiface_pcm_set_rate(struct pcm_runtime *rt, unsigned int rate)
* This control message doesn't have any ack from the
* other side
*/
- ret = usb_control_msg_send(device, 0,
- HIFACE_SET_RATE_REQUEST,
- USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_OTHER,
- rate_value, 0, NULL, 0, 100);
- if (ret)
+ ret = usb_control_msg(device, usb_sndctrlpipe(device, 0),
+ HIFACE_SET_RATE_REQUEST,
+ USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_OTHER,
+ rate_value, 0, NULL, 0, 100);
+ if (ret < 0) {
dev_err(&device->dev, "Error setting samplerate %d.\n", rate);
+ return ret;
+ }
- return ret;
+ return 0;
}
static struct pcm_substream *hiface_pcm_get_substream(struct snd_pcm_substream