ALSA: sonicvibes: Remove always NULL parameter
snd_sonicvibes_pcm() take 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>
This commit is contained in:
parent
15aded4c92
commit
0f33991dd2
|
@ -880,8 +880,7 @@ static struct snd_pcm_ops snd_sonicvibes_capture_ops = {
|
||||||
.pointer = snd_sonicvibes_capture_pointer,
|
.pointer = snd_sonicvibes_capture_pointer,
|
||||||
};
|
};
|
||||||
|
|
||||||
static int snd_sonicvibes_pcm(struct sonicvibes *sonic, int device,
|
static int snd_sonicvibes_pcm(struct sonicvibes *sonic, int device)
|
||||||
struct snd_pcm **rpcm)
|
|
||||||
{
|
{
|
||||||
struct snd_pcm *pcm;
|
struct snd_pcm *pcm;
|
||||||
int err;
|
int err;
|
||||||
|
@ -902,8 +901,6 @@ static int snd_sonicvibes_pcm(struct sonicvibes *sonic, int device,
|
||||||
snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
|
snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
|
||||||
snd_dma_pci_data(sonic->pci), 64*1024, 128*1024);
|
snd_dma_pci_data(sonic->pci), 64*1024, 128*1024);
|
||||||
|
|
||||||
if (rpcm)
|
|
||||||
*rpcm = pcm;
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1491,7 +1488,7 @@ static int snd_sonic_probe(struct pci_dev *pci,
|
||||||
(unsigned long long)pci_resource_start(pci, 1),
|
(unsigned long long)pci_resource_start(pci, 1),
|
||||||
sonic->irq);
|
sonic->irq);
|
||||||
|
|
||||||
if ((err = snd_sonicvibes_pcm(sonic, 0, NULL)) < 0) {
|
if ((err = snd_sonicvibes_pcm(sonic, 0)) < 0) {
|
||||||
snd_card_free(card);
|
snd_card_free(card);
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue