Commit 66b5542e authored by Takashi Iwai's avatar Takashi Iwai

usb: gadget: u_uac1: Kill set_fs() usage

With the new API to perform the in-kernel buffer copy, we can get rid
of set_fs() usage in this driver, finally.
Acked-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: default avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 68541213
...@@ -157,7 +157,6 @@ size_t u_audio_playback(struct gaudio *card, void *buf, size_t count) ...@@ -157,7 +157,6 @@ size_t u_audio_playback(struct gaudio *card, void *buf, size_t count)
struct gaudio_snd_dev *snd = &card->playback; struct gaudio_snd_dev *snd = &card->playback;
struct snd_pcm_substream *substream = snd->substream; struct snd_pcm_substream *substream = snd->substream;
struct snd_pcm_runtime *runtime = substream->runtime; struct snd_pcm_runtime *runtime = substream->runtime;
mm_segment_t old_fs;
ssize_t result; ssize_t result;
snd_pcm_sframes_t frames; snd_pcm_sframes_t frames;
...@@ -174,15 +173,11 @@ size_t u_audio_playback(struct gaudio *card, void *buf, size_t count) ...@@ -174,15 +173,11 @@ size_t u_audio_playback(struct gaudio *card, void *buf, size_t count)
} }
frames = bytes_to_frames(runtime, count); frames = bytes_to_frames(runtime, count);
old_fs = get_fs(); result = snd_pcm_kernel_write(snd->substream, buf, frames);
set_fs(KERNEL_DS);
result = snd_pcm_lib_write(snd->substream, (void __user *)buf, frames);
if (result != frames) { if (result != frames) {
ERROR(card, "Playback error: %d\n", (int)result); ERROR(card, "Playback error: %d\n", (int)result);
set_fs(old_fs);
goto try_again; goto try_again;
} }
set_fs(old_fs);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment