diff options
Diffstat (limited to 'include/sound')
-rw-r--r-- | include/sound/pcm.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/sound/pcm.h b/include/sound/pcm.h index cebf0310a8dc..f84d84993a31 100644 --- a/include/sound/pcm.h +++ b/include/sound/pcm.h | |||
@@ -300,7 +300,6 @@ struct snd_pcm_runtime { | |||
300 | /* -- mmap -- */ | 300 | /* -- mmap -- */ |
301 | volatile struct snd_pcm_mmap_status *status; | 301 | volatile struct snd_pcm_mmap_status *status; |
302 | volatile struct snd_pcm_mmap_control *control; | 302 | volatile struct snd_pcm_mmap_control *control; |
303 | atomic_t mmap_count; | ||
304 | 303 | ||
305 | /* -- locking / scheduling -- */ | 304 | /* -- locking / scheduling -- */ |
306 | wait_queue_head_t sleep; | 305 | wait_queue_head_t sleep; |
@@ -369,6 +368,7 @@ struct snd_pcm_substream { | |||
369 | /* -- assigned files -- */ | 368 | /* -- assigned files -- */ |
370 | void *file; | 369 | void *file; |
371 | int ref_count; | 370 | int ref_count; |
371 | atomic_t mmap_count; | ||
372 | unsigned int f_flags; | 372 | unsigned int f_flags; |
373 | void (*pcm_release)(struct snd_pcm_substream *); | 373 | void (*pcm_release)(struct snd_pcm_substream *); |
374 | #if defined(CONFIG_SND_PCM_OSS) || defined(CONFIG_SND_PCM_OSS_MODULE) | 374 | #if defined(CONFIG_SND_PCM_OSS) || defined(CONFIG_SND_PCM_OSS_MODULE) |
@@ -972,13 +972,13 @@ struct page *snd_pcm_sgbuf_ops_page(struct snd_pcm_substream *substream, unsigne | |||
972 | static inline void snd_pcm_mmap_data_open(struct vm_area_struct *area) | 972 | static inline void snd_pcm_mmap_data_open(struct vm_area_struct *area) |
973 | { | 973 | { |
974 | struct snd_pcm_substream *substream = (struct snd_pcm_substream *)area->vm_private_data; | 974 | struct snd_pcm_substream *substream = (struct snd_pcm_substream *)area->vm_private_data; |
975 | atomic_inc(&substream->runtime->mmap_count); | 975 | atomic_inc(&substream->mmap_count); |
976 | } | 976 | } |
977 | 977 | ||
978 | static inline void snd_pcm_mmap_data_close(struct vm_area_struct *area) | 978 | static inline void snd_pcm_mmap_data_close(struct vm_area_struct *area) |
979 | { | 979 | { |
980 | struct snd_pcm_substream *substream = (struct snd_pcm_substream *)area->vm_private_data; | 980 | struct snd_pcm_substream *substream = (struct snd_pcm_substream *)area->vm_private_data; |
981 | atomic_dec(&substream->runtime->mmap_count); | 981 | atomic_dec(&substream->mmap_count); |
982 | } | 982 | } |
983 | 983 | ||
984 | /* mmap for io-memory area */ | 984 | /* mmap for io-memory area */ |