Commit 15aded4c authored by Lars-Peter Clausen's avatar Lars-Peter Clausen Committed by Takashi Iwai

ALSA: riptide: Remove always NULL parameter

snd_riptide_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: default avatarLars-Peter Clausen <lars@metafoo.de>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 08a4c10b
...@@ -1706,14 +1706,11 @@ static struct snd_pcm_ops snd_riptide_capture_ops = { ...@@ -1706,14 +1706,11 @@ static struct snd_pcm_ops snd_riptide_capture_ops = {
.pointer = snd_riptide_pointer, .pointer = snd_riptide_pointer,
}; };
static int static int snd_riptide_pcm(struct snd_riptide *chip, int device)
snd_riptide_pcm(struct snd_riptide *chip, int device, struct snd_pcm **rpcm)
{ {
struct snd_pcm *pcm; struct snd_pcm *pcm;
int err; int err;
if (rpcm)
*rpcm = NULL;
if ((err = if ((err =
snd_pcm_new(chip->card, "RIPTIDE", device, PLAYBACK_SUBSTREAMS, 1, snd_pcm_new(chip->card, "RIPTIDE", device, PLAYBACK_SUBSTREAMS, 1,
&pcm)) < 0) &pcm)) < 0)
...@@ -1729,8 +1726,6 @@ snd_riptide_pcm(struct snd_riptide *chip, int device, struct snd_pcm **rpcm) ...@@ -1729,8 +1726,6 @@ snd_riptide_pcm(struct snd_riptide *chip, int device, struct snd_pcm **rpcm)
snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV_SG, snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV_SG,
snd_dma_pci_data(chip->pci), snd_dma_pci_data(chip->pci),
64 * 1024, 128 * 1024); 64 * 1024, 128 * 1024);
if (rpcm)
*rpcm = pcm;
return 0; return 0;
} }
...@@ -2092,7 +2087,7 @@ snd_card_riptide_probe(struct pci_dev *pci, const struct pci_device_id *pci_id) ...@@ -2092,7 +2087,7 @@ snd_card_riptide_probe(struct pci_dev *pci, const struct pci_device_id *pci_id)
if (err < 0) if (err < 0)
goto error; goto error;
card->private_data = chip; card->private_data = chip;
err = snd_riptide_pcm(chip, 0, NULL); err = snd_riptide_pcm(chip, 0);
if (err < 0) if (err < 0)
goto error; goto error;
err = snd_riptide_mixer(chip); err = snd_riptide_mixer(chip);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment