ALSA: es18xx: Remove always NULL parameter
snd_es18xx_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>
This commit is contained in:
parent
4b8ab88518
commit
1a2515ac94
|
@ -1687,16 +1687,13 @@ static struct snd_pcm_ops snd_es18xx_capture_ops = {
|
||||||
.pointer = snd_es18xx_capture_pointer,
|
.pointer = snd_es18xx_capture_pointer,
|
||||||
};
|
};
|
||||||
|
|
||||||
static int snd_es18xx_pcm(struct snd_card *card, int device,
|
static int snd_es18xx_pcm(struct snd_card *card, int device)
|
||||||
struct snd_pcm **rpcm)
|
|
||||||
{
|
{
|
||||||
struct snd_es18xx *chip = card->private_data;
|
struct snd_es18xx *chip = card->private_data;
|
||||||
struct snd_pcm *pcm;
|
struct snd_pcm *pcm;
|
||||||
char str[16];
|
char str[16];
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
if (rpcm)
|
|
||||||
*rpcm = NULL;
|
|
||||||
sprintf(str, "ES%x", chip->version);
|
sprintf(str, "ES%x", chip->version);
|
||||||
if (chip->caps & ES18XX_PCM2)
|
if (chip->caps & ES18XX_PCM2)
|
||||||
err = snd_pcm_new(card, str, device, 2, 1, &pcm);
|
err = snd_pcm_new(card, str, device, 2, 1, &pcm);
|
||||||
|
@ -1722,9 +1719,6 @@ static int snd_es18xx_pcm(struct snd_card *card, int device,
|
||||||
snd_dma_isa_data(),
|
snd_dma_isa_data(),
|
||||||
64*1024,
|
64*1024,
|
||||||
chip->dma1 > 3 || chip->dma2 > 3 ? 128*1024 : 64*1024);
|
chip->dma1 > 3 || chip->dma2 > 3 ? 128*1024 : 64*1024);
|
||||||
|
|
||||||
if (rpcm)
|
|
||||||
*rpcm = pcm;
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2154,7 +2148,7 @@ static int snd_audiodrive_probe(struct snd_card *card, int dev)
|
||||||
chip->port,
|
chip->port,
|
||||||
irq[dev], dma1[dev]);
|
irq[dev], dma1[dev]);
|
||||||
|
|
||||||
err = snd_es18xx_pcm(card, 0, NULL);
|
err = snd_es18xx_pcm(card, 0);
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
return err;
|
return err;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue