• Takashi Iwai's avatar
    ALSA: pcm: Remove set_fs() in PCM core code · c2c86a97
    Takashi Iwai authored
    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: default avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
    Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
    c2c86a97
pcm_compat.c 21.7 KB