[ALSA] Fix control/status mmap with shared PCM substream
The flag to avoid 32bit-incompatible mmap for control/status records should be outside the pcm substream instance since a substream can be shared among multiple opens. Now it's flagged in pcm_file list that is directly assigned to file->private_data. Also, removed snd_pcm_add_file() and remove_file() functions and substream.files field that are not really used in the code. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
This commit is contained in:
committed by
Jaroslav Kysela
parent
1c39855804
commit
548a648b98
@@ -478,7 +478,7 @@ static long snd_pcm_ioctl_compat(struct file *file, unsigned int cmd, unsigned l
|
||||
* mmap of PCM status/control records because of the size
|
||||
* incompatibility.
|
||||
*/
|
||||
substream->no_mmap_ctrl = 1;
|
||||
pcm_file->no_compat_mmap = 1;
|
||||
|
||||
switch (cmd) {
|
||||
case SNDRV_PCM_IOCTL_PVERSION:
|
||||
|
Reference in New Issue
Block a user