summaryrefslogtreecommitdiff
path: root/sound/drivers
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2015-01-02 12:24:35 +0100
committerTakashi Iwai <tiwai@suse.de>2015-01-02 16:25:53 +0100
commite9dd86267f2571a9649399c9e268266ca5aa6152 (patch)
tree94155e0053261840c8785c3388a0193f14d945d7 /sound/drivers
parentc9a458519dd69eb512a074f920a81d4906548306 (diff)
ALSA: ml403-ac97cr: Remove always NULL parameter
snd_ml403_ac97cr_pcm() takes a pointer to a pointer of a PCM where if this parameter is provided the newly allocated PCM is stored. All callers pass NULL though, so remove the parameter. This makes the code a bit cleaner and shorter. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/drivers')
-rw-r--r--sound/drivers/ml403-ac97cr.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/sound/drivers/ml403-ac97cr.c b/sound/drivers/ml403-ac97cr.c
index bcca825a1c8d..ec01de1cb23b 100644
--- a/sound/drivers/ml403-ac97cr.c
+++ b/sound/drivers/ml403-ac97cr.c
@@ -1238,14 +1238,11 @@ snd_ml403_ac97cr_mixer(struct snd_ml403_ac97cr *ml403_ac97cr)
}
static int
-snd_ml403_ac97cr_pcm(struct snd_ml403_ac97cr *ml403_ac97cr, int device,
- struct snd_pcm **rpcm)
+snd_ml403_ac97cr_pcm(struct snd_ml403_ac97cr *ml403_ac97cr, int device)
{
struct snd_pcm *pcm;
int err;
- if (rpcm)
- *rpcm = NULL;
err = snd_pcm_new(ml403_ac97cr->card, "ML403AC97CR/1", device, 1, 1,
&pcm);
if (err < 0)
@@ -1263,8 +1260,6 @@ snd_ml403_ac97cr_pcm(struct snd_ml403_ac97cr *ml403_ac97cr, int device,
snd_dma_continuous_data(GFP_KERNEL),
64 * 1024,
128 * 1024);
- if (rpcm)
- *rpcm = pcm;
return 0;
}
@@ -1298,7 +1293,7 @@ static int snd_ml403_ac97cr_probe(struct platform_device *pfdev)
return err;
}
PDEBUG(INIT_INFO, "probe(): mixer done\n");
- err = snd_ml403_ac97cr_pcm(ml403_ac97cr, 0, NULL);
+ err = snd_ml403_ac97cr_pcm(ml403_ac97cr, 0);
if (err < 0) {
snd_card_free(card);
return err;