]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitc6a33edbdf5e64171067265964f444403665f428
treea2ac275244082ad47d1c811d85e3e2a24c97fbdc
parentf528d00d919a91af9649465edfb27b5538b0194a
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