]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit - sound/core/pcm_compat.c
ALSA: pcm: Remove set_fs() in PCM core code
authorTakashi Iwai <tiwai@suse.de>
Wed, 10 May 2017 12:33:44 +0000 (14:33 +0200)
committerTakashi Iwai <tiwai@suse.de>
Tue, 23 May 2017 05:04:05 +0000 (07:04 +0200)
commitc2c86a97175f552fd32b339426a489c7af818123
treea2ac275244082ad47d1c811d85e3e2a24c97fbdc
parent53e7bf452584e73df8a529a2b157a1225a52637f
ALSA: pcm: Remove set_fs() in PCM core code

PCM core code has a few usages of set_fs(), mostly for two codepaths:
- The DELAY ioctl call from pcm_compat.c
- The ioctl wrapper in kernel context for PCM OSS and other

This patch removes the set_fs() usage in these places by a slight code
refactoring.  For the former point, snd_pcm_delay() is changed to
return the  value directly instead of putting the value to the given
address.  Each caller stores the result in an appropriate manner.

For fixing the latter, snd_pcm_lib_kernel_ioctl() is changed to call
the functions directly as well.  For achieving it, now the function
accepts only the limited set of ioctls that have been used, so far.
The primary user of this function is the PCM OSS layer, and the only
other user is USB UAC1 gadget driver.  Both drivers don't need the
full set of ioctls.

Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/core/pcm_compat.c
sound/core/pcm_native.c