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>
Esse commit está contido em:

commit de
Takashi Iwai

pai
50b8d94e18
commit
bb814c396a
@@ -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;
|
||||
}
|
||||
|
Referência em uma nova issue
Block a user