ALSA: remove the dead code from snd_pcm_open_file()
PATCH 1/1 ALSA: 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 <[email protected]>
--- sound/core/pcm_native.c | 12 +++--------- 1 files changed, 3 insertions(+), 9 deletions(-)
sound/core/pcm_native.c +3 -9
@@ -2058,16 +2058,12 @@ EXPORT_SYMBOL(snd_pcm_open_substream);static int snd_pcm_open_file (struct file *file,struct snd_pcm *pcm, -int stream, -struct snd_pcm_file **rpcm_file) +int stream) {struct snd_pcm_file *pcm_file;struct snd_pcm_substream *substream;int err; -if (rpcm_file) - *rpcm_file =NULL ; - err =snd_pcm_open_substream (pcm, stream, file, &substream);if (err <0 )return err;
@@ -2083,8 +2079,7 @@ static int snd_pcm_open_file(struct file *file, substream->pcm_release = pcm_release_private; } file->private_data = pcm_file; -if (rpcm_file) - *rpcm_file = pcm_file; +return 0 ; }
@@ -2113,7 +2108,6 @@ static int snd_pcm_capture_open(struct inode *inode, struct file *file)static int snd_pcm_open (struct file *file,struct snd_pcm *pcm,int stream) {int err; -struct snd_pcm_file *pcm_file;wait_queue_t wait;if (pcm ==NULL ) {
@@ -2131,7 +2125,7 @@ static int snd_pcm_open(struct file *file, struct snd_pcm *pcm, int stream)add_wait_queue (&pcm->open_wait, &wait);mutex_lock (&pcm->open_mutex);while (1 ) { - err =snd_pcm_open_file (file, pcm, stream, &pcm_file); + err =snd_pcm_open_file (file, pcm, stream);if (err >=0 )break ;if (err == -EAGAIN ) {
Signature · 1 line
1.7.1
Takashi Iwai
AppliedAt Mon, 10 Oct 2011 10:31:48 +0800,
Quoted 5 lines · Feng Tang
The
rpcm_fileparameter is never used in current ALSA code, so remove it to make it cleaner.Signed-off-by Feng Tang <[email protected]>
Thanks, applied.
Takashi
Quoted 56 lines
--- sound/core/pcm_native.c | 12 +++--------- 1 files changed, 3 insertions(+), 9 deletions(-)sound/core/pcm_native.c +3
-9@@ -2058,16 +2058,12 @@ EXPORT_SYMBOL(snd_pcm_open_substream);static int snd_pcm_open_file (struct file *file,struct snd_pcm *pcm, -int stream, -struct snd_pcm_file **rpcm_file) +int stream) {struct snd_pcm_file *pcm_file;struct snd_pcm_substream *substream;int err; -if (rpcm_file) - *rpcm_file =NULL ; - err =snd_pcm_open_substream (pcm, stream, file, &substream);if (err <0 )return err;@@ -2083,8 +2079,7 @@ static int snd_pcm_open_file(struct file *file, substream->pcm_release = pcm_release_private; } file->private_data = pcm_file; -if (rpcm_file) - *rpcm_file = pcm_file; +return 0 ; }@@ -2113,7 +2108,6 @@ static int snd_pcm_capture_open(struct inode *inode, struct file *file)static int snd_pcm_open (struct file *file,struct snd_pcm *pcm,int stream) {int err; -struct snd_pcm_file *pcm_file;wait_queue_t wait;if (pcm ==NULL ) {@@ -2131,7 +2125,7 @@ static int snd_pcm_open(struct file *file, struct snd_pcm *pcm, int stream)add_wait_queue (&pcm->open_wait, &wait);mutex_lock (&pcm->open_mutex);while (1 ) { - err =snd_pcm_open_file (file, pcm, stream, &pcm_file); + err =snd_pcm_open_file (file, pcm, stream);if (err >=0 )break ;if (err == -EAGAIN ) {Signature · 1 line
1.7.1