diff options
Diffstat (limited to 'sound/core/pcm_native.c')
-rw-r--r-- | sound/core/pcm_native.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c index b597408d5faa..1c6be91dfb98 100644 --- a/sound/core/pcm_native.c +++ b/sound/core/pcm_native.c | |||
@@ -1527,13 +1527,11 @@ static int snd_pcm_drain(struct snd_pcm_substream *substream, | |||
1527 | static int snd_pcm_drop(struct snd_pcm_substream *substream) | 1527 | static int snd_pcm_drop(struct snd_pcm_substream *substream) |
1528 | { | 1528 | { |
1529 | struct snd_pcm_runtime *runtime; | 1529 | struct snd_pcm_runtime *runtime; |
1530 | struct snd_card *card; | ||
1531 | int result = 0; | 1530 | int result = 0; |
1532 | 1531 | ||
1533 | if (PCM_RUNTIME_CHECK(substream)) | 1532 | if (PCM_RUNTIME_CHECK(substream)) |
1534 | return -ENXIO; | 1533 | return -ENXIO; |
1535 | runtime = substream->runtime; | 1534 | runtime = substream->runtime; |
1536 | card = substream->pcm->card; | ||
1537 | 1535 | ||
1538 | if (runtime->status->state == SNDRV_PCM_STATE_OPEN || | 1536 | if (runtime->status->state == SNDRV_PCM_STATE_OPEN || |
1539 | runtime->status->state == SNDRV_PCM_STATE_DISCONNECTED || | 1537 | runtime->status->state == SNDRV_PCM_STATE_DISCONNECTED || |
@@ -2065,7 +2063,6 @@ static int snd_pcm_open_file(struct file *file, | |||
2065 | { | 2063 | { |
2066 | struct snd_pcm_file *pcm_file; | 2064 | struct snd_pcm_file *pcm_file; |
2067 | struct snd_pcm_substream *substream; | 2065 | struct snd_pcm_substream *substream; |
2068 | struct snd_pcm_str *str; | ||
2069 | int err; | 2066 | int err; |
2070 | 2067 | ||
2071 | if (rpcm_file) | 2068 | if (rpcm_file) |
@@ -2082,7 +2079,6 @@ static int snd_pcm_open_file(struct file *file, | |||
2082 | } | 2079 | } |
2083 | pcm_file->substream = substream; | 2080 | pcm_file->substream = substream; |
2084 | if (substream->ref_count == 1) { | 2081 | if (substream->ref_count == 1) { |
2085 | str = substream->pstr; | ||
2086 | substream->file = pcm_file; | 2082 | substream->file = pcm_file; |
2087 | substream->pcm_release = pcm_release_private; | 2083 | substream->pcm_release = pcm_release_private; |
2088 | } | 2084 | } |
@@ -3024,11 +3020,9 @@ static const struct vm_operations_struct snd_pcm_vm_ops_status = | |||
3024 | static int snd_pcm_mmap_status(struct snd_pcm_substream *substream, struct file *file, | 3020 | static int snd_pcm_mmap_status(struct snd_pcm_substream *substream, struct file *file, |
3025 | struct vm_area_struct *area) | 3021 | struct vm_area_struct *area) |
3026 | { | 3022 | { |
3027 | struct snd_pcm_runtime *runtime; | ||
3028 | long size; | 3023 | long size; |
3029 | if (!(area->vm_flags & VM_READ)) | 3024 | if (!(area->vm_flags & VM_READ)) |
3030 | return -EINVAL; | 3025 | return -EINVAL; |
3031 | runtime = substream->runtime; | ||
3032 | size = area->vm_end - area->vm_start; | 3026 | size = area->vm_end - area->vm_start; |
3033 | if (size != PAGE_ALIGN(sizeof(struct snd_pcm_mmap_status))) | 3027 | if (size != PAGE_ALIGN(sizeof(struct snd_pcm_mmap_status))) |
3034 | return -EINVAL; | 3028 | return -EINVAL; |
@@ -3063,11 +3057,9 @@ static const struct vm_operations_struct snd_pcm_vm_ops_control = | |||
3063 | static int snd_pcm_mmap_control(struct snd_pcm_substream *substream, struct file *file, | 3057 | static int snd_pcm_mmap_control(struct snd_pcm_substream *substream, struct file *file, |
3064 | struct vm_area_struct *area) | 3058 | struct vm_area_struct *area) |
3065 | { | 3059 | { |
3066 | struct snd_pcm_runtime *runtime; | ||
3067 | long size; | 3060 | long size; |
3068 | if (!(area->vm_flags & VM_READ)) | 3061 | if (!(area->vm_flags & VM_READ)) |
3069 | return -EINVAL; | 3062 | return -EINVAL; |
3070 | runtime = substream->runtime; | ||
3071 | size = area->vm_end - area->vm_start; | 3063 | size = area->vm_end - area->vm_start; |
3072 | if (size != PAGE_ALIGN(sizeof(struct snd_pcm_mmap_control))) | 3064 | if (size != PAGE_ALIGN(sizeof(struct snd_pcm_mmap_control))) |
3073 | return -EINVAL; | 3065 | return -EINVAL; |