]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
ALSA: msnd: Remove always NULL parameter
authorLars-Peter Clausen <lars@metafoo.de>
Fri, 2 Jan 2015 11:24:40 +0000 (12:24 +0100)
committerTakashi Iwai <tiwai@suse.de>
Fri, 2 Jan 2015 15:28:04 +0000 (16:28 +0100)
snd_msnd_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>
sound/isa/msnd/msnd.c
sound/isa/msnd/msnd.h
sound/isa/msnd/msnd_pinnacle.c

index 1cee18fb28a8941975e0caf752b9c65102053761..835d4aa26761e5beea169912cbdde1a884036d89 100644 (file)
@@ -679,8 +679,7 @@ static struct snd_pcm_ops snd_msnd_capture_ops = {
 };
 
 
-int snd_msnd_pcm(struct snd_card *card, int device,
-                       struct snd_pcm **rpcm)
+int snd_msnd_pcm(struct snd_card *card, int device)
 {
        struct snd_msnd *chip = card->private_data;
        struct snd_pcm  *pcm;
@@ -696,9 +695,6 @@ int snd_msnd_pcm(struct snd_card *card, int device,
        pcm->private_data = chip;
        strcpy(pcm->name, "Hurricane");
 
-
-       if (rpcm)
-               *rpcm = pcm;
        return 0;
 }
 EXPORT_SYMBOL(snd_msnd_pcm);
index dbac3a42347b7db65a2394daeebf4a6a86529f41..5f3c7dcd9f9dda1da7335d984f08f1e03fa47701 100644 (file)
@@ -297,7 +297,7 @@ int snd_msnd_disable_irq(struct snd_msnd *chip);
 void snd_msnd_dsp_halt(struct snd_msnd *chip, struct file *file);
 int snd_msnd_DAPQ(struct snd_msnd *chip, int start);
 int snd_msnd_DARQ(struct snd_msnd *chip, int start);
-int snd_msnd_pcm(struct snd_card *card, int device, struct snd_pcm **rpcm);
+int snd_msnd_pcm(struct snd_card *card, int device);
 
 int snd_msndmidi_new(struct snd_card *card, int device);
 void snd_msndmidi_input_read(void *mpu);
index 5016bf957f51d69778b2ff57b5ad4d7abe5acb97..65b36825d194a63d366f79eea5ed0adc5f517c04 100644 (file)
@@ -582,7 +582,7 @@ static int snd_msnd_attach(struct snd_card *card)
        if (err < 0)
                goto err_release_region;
 
-       err = snd_msnd_pcm(card, 0, NULL);
+       err = snd_msnd_pcm(card, 0);
        if (err < 0) {
                printk(KERN_ERR LOGNAME ": error creating new PCM device\n");
                goto err_release_region;