summaryrefslogtreecommitdiff
path: root/sound/pci/emu10k1/emu10k1x.c
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2015-01-02 12:24:49 +0100
committerTakashi Iwai <tiwai@suse.de>2015-01-02 16:32:45 +0100
commitbb814c396af777c31ed168ce57f620967dd133f1 (patch)
tree70d3942496cbb0f7b708488f885b7e098afc4fc9 /sound/pci/emu10k1/emu10k1x.c
parent50b8d94e1819768e8eccae4d24698a17b8940776 (diff)
ALSA: emu10k1: Remove always NULL parameters
The various PCM and hwdep allocation functions in this driver take a pointer to a pointer of a PCM/hwdep where if this parameter is provided the newly allocated object is stored. All callers pass NULL though, so remove the parameter. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/emu10k1/emu10k1x.c')
-rw-r--r--sound/pci/emu10k1/emu10k1x.c19
1 files changed, 5 insertions, 14 deletions
diff --git a/sound/pci/emu10k1/emu10k1x.c b/sound/pci/emu10k1/emu10k1x.c
index 15933f92f63a..6d1b98d14327 100644
--- a/sound/pci/emu10k1/emu10k1x.c
+++ b/sound/pci/emu10k1/emu10k1x.c
@@ -847,15 +847,13 @@ static const struct snd_pcm_chmap_elem clfe_map[] = {
{ }
};
-static int snd_emu10k1x_pcm(struct emu10k1x *emu, int device, struct snd_pcm **rpcm)
+static int snd_emu10k1x_pcm(struct emu10k1x *emu, int device)
{
struct snd_pcm *pcm;
const struct snd_pcm_chmap_elem *map = NULL;
int err;
int capture = 0;
- if (rpcm)
- *rpcm = NULL;
if (device == 0)
capture = 1;
@@ -896,15 +894,8 @@ static int snd_emu10k1x_pcm(struct emu10k1x *emu, int device, struct snd_pcm **r
snd_dma_pci_data(emu->pci),
32*1024, 32*1024);
- err = snd_pcm_add_chmap_ctls(pcm, SNDRV_PCM_STREAM_PLAYBACK, map, 2,
+ return snd_pcm_add_chmap_ctls(pcm, SNDRV_PCM_STREAM_PLAYBACK, map, 2,
1 << 2, NULL);
- if (err < 0)
- return err;
-
- if (rpcm)
- *rpcm = pcm;
-
- return 0;
}
static int snd_emu10k1x_create(struct snd_card *card,
@@ -1583,15 +1574,15 @@ static int snd_emu10k1x_probe(struct pci_dev *pci,
return err;
}
- if ((err = snd_emu10k1x_pcm(chip, 0, NULL)) < 0) {
+ if ((err = snd_emu10k1x_pcm(chip, 0)) < 0) {
snd_card_free(card);
return err;
}
- if ((err = snd_emu10k1x_pcm(chip, 1, NULL)) < 0) {
+ if ((err = snd_emu10k1x_pcm(chip, 1)) < 0) {
snd_card_free(card);
return err;
}
- if ((err = snd_emu10k1x_pcm(chip, 2, NULL)) < 0) {
+ if ((err = snd_emu10k1x_pcm(chip, 2)) < 0) {
snd_card_free(card);
return err;
}