summaryrefslogtreecommitdiff
path: root/sound/isa/es1688/es1688_lib.c
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2015-01-02 12:24:37 +0100
committerTakashi Iwai <tiwai@suse.de>2015-01-02 16:27:03 +0100
commit4b8ab88518726197c8659bc9aca96c6af01dab57 (patch)
treedd248ea06b8d5c9102889768cffc448e2d2e25a0 /sound/isa/es1688/es1688_lib.c
parent7f605418837add961466dc66f7370332d44c1a92 (diff)
downloadlinux-rt-4b8ab88518726197c8659bc9aca96c6af01dab57.tar.gz
ALSA: es1688: Remove almost always NULL parameter
snd_es1688_pcm() takes a pointer to a pointer of a PCM where if this parameter is provided the newly allocated PCM is stored. This PCM is also available from the pcm field of the snd_es1688 struct that got passed to the same function. This patch updates all callers which passed a pointer to use that field instead and then removes the parameter from the function. This makes the code a bit shorter and cleaner. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/isa/es1688/es1688_lib.c')
-rw-r--r--sound/isa/es1688/es1688_lib.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/sound/isa/es1688/es1688_lib.c b/sound/isa/es1688/es1688_lib.c
index b5450143407b..52aac8467178 100644
--- a/sound/isa/es1688/es1688_lib.c
+++ b/sound/isa/es1688/es1688_lib.c
@@ -728,8 +728,7 @@ static struct snd_pcm_ops snd_es1688_capture_ops = {
.pointer = snd_es1688_capture_pointer,
};
-int snd_es1688_pcm(struct snd_card *card, struct snd_es1688 *chip,
- int device, struct snd_pcm **rpcm)
+int snd_es1688_pcm(struct snd_card *card, struct snd_es1688 *chip, int device)
{
struct snd_pcm *pcm;
int err;
@@ -749,9 +748,6 @@ int snd_es1688_pcm(struct snd_card *card, struct snd_es1688 *chip,
snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
snd_dma_isa_data(),
64*1024, 64*1024);
-
- if (rpcm)
- *rpcm = pcm;
return 0;
}