aboutsummaryrefslogtreecommitdiffstats
path: root/sound/core/pcm_native.c
diff options
context:
space:
mode:
authorFeng Tang <feng.tang@intel.com>2011-10-09 22:31:48 -0400
committerTakashi Iwai <tiwai@suse.de>2011-10-10 06:53:53 -0400
commitffd3d5c6c7a20fb718daf98a6c8a476d228f3995 (patch)
treef346bbadc25197c5a159009e8f91c648c98b1066 /sound/core/pcm_native.c
parent8d448162bda5ae3b5ecb26fe50c8fbbeae99faa4 (diff)
ALSA: pcm - remove the dead code from snd_pcm_open_file()
The rpcm_file parameter is never used in current ALSA code, so remove it to make it cleaner. Signed-off-by: Feng Tang <feng.tang@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core/pcm_native.c')
-rw-r--r--sound/core/pcm_native.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c
index 1c6be91dfb98..2d3af5df88d6 100644
--- a/sound/core/pcm_native.c
+++ b/sound/core/pcm_native.c
@@ -2058,16 +2058,12 @@ EXPORT_SYMBOL(snd_pcm_open_substream);
2058 2058
2059static int snd_pcm_open_file(struct file *file, 2059static int snd_pcm_open_file(struct file *file,
2060 struct snd_pcm *pcm, 2060 struct snd_pcm *pcm,
2061 int stream, 2061 int stream)
2062 struct snd_pcm_file **rpcm_file)
2063{ 2062{
2064 struct snd_pcm_file *pcm_file; 2063 struct snd_pcm_file *pcm_file;
2065 struct snd_pcm_substream *substream; 2064 struct snd_pcm_substream *substream;
2066 int err; 2065 int err;
2067 2066
2068 if (rpcm_file)
2069 *rpcm_file = NULL;
2070
2071 err = snd_pcm_open_substream(pcm, stream, file, &substream); 2067 err = snd_pcm_open_substream(pcm, stream, file, &substream);
2072 if (err < 0) 2068 if (err < 0)
2073 return err; 2069 return err;
@@ -2083,8 +2079,7 @@ static int snd_pcm_open_file(struct file *file,
2083 substream->pcm_release = pcm_release_private; 2079 substream->pcm_release = pcm_release_private;
2084 } 2080 }
2085 file->private_data = pcm_file; 2081 file->private_data = pcm_file;
2086 if (rpcm_file) 2082
2087 *rpcm_file = pcm_file;
2088 return 0; 2083 return 0;
2089} 2084}
2090 2085
@@ -2113,7 +2108,6 @@ static int snd_pcm_capture_open(struct inode *inode, struct file *file)
2113static int snd_pcm_open(struct file *file, struct snd_pcm *pcm, int stream) 2108static int snd_pcm_open(struct file *file, struct snd_pcm *pcm, int stream)
2114{ 2109{
2115 int err; 2110 int err;
2116 struct snd_pcm_file *pcm_file;
2117 wait_queue_t wait; 2111 wait_queue_t wait;
2118 2112
2119 if (pcm == NULL) { 2113 if (pcm == NULL) {
@@ -2131,7 +2125,7 @@ static int snd_pcm_open(struct file *file, struct snd_pcm *pcm, int stream)
2131 add_wait_queue(&pcm->open_wait, &wait); 2125 add_wait_queue(&pcm->open_wait, &wait);
2132 mutex_lock(&pcm->open_mutex); 2126 mutex_lock(&pcm->open_mutex);
2133 while (1) { 2127 while (1) {
2134 err = snd_pcm_open_file(file, pcm, stream, &pcm_file); 2128 err = snd_pcm_open_file(file, pcm, stream);
2135 if (err >= 0) 2129 if (err >= 0)
2136 break; 2130 break;
2137 if (err == -EAGAIN) { 2131 if (err == -EAGAIN) {