diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2015-01-02 06:24:50 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2015-01-02 10:33:03 -0500 |
commit | 483337f903dd39a10d4d6617cf6f30feeead061c (patch) | |
tree | a9914694bd1d26e468e2da652fe01c316680f7f1 | |
parent | bb814c396af777c31ed168ce57f620967dd133f1 (diff) |
ALSA: fm801: Remove always NULL parameter
snd_fm801_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>
-rw-r--r-- | sound/pci/fm801.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/sound/pci/fm801.c b/sound/pci/fm801.c index d167afffce5f..9a2122fd3a8e 100644 --- a/sound/pci/fm801.c +++ b/sound/pci/fm801.c | |||
@@ -704,13 +704,11 @@ static struct snd_pcm_ops snd_fm801_capture_ops = { | |||
704 | .pointer = snd_fm801_capture_pointer, | 704 | .pointer = snd_fm801_capture_pointer, |
705 | }; | 705 | }; |
706 | 706 | ||
707 | static int snd_fm801_pcm(struct fm801 *chip, int device, struct snd_pcm **rpcm) | 707 | static int snd_fm801_pcm(struct fm801 *chip, int device) |
708 | { | 708 | { |
709 | struct snd_pcm *pcm; | 709 | struct snd_pcm *pcm; |
710 | int err; | 710 | int err; |
711 | 711 | ||
712 | if (rpcm) | ||
713 | *rpcm = NULL; | ||
714 | if ((err = snd_pcm_new(chip->card, "FM801", device, 1, 1, &pcm)) < 0) | 712 | if ((err = snd_pcm_new(chip->card, "FM801", device, 1, 1, &pcm)) < 0) |
715 | return err; | 713 | return err; |
716 | 714 | ||
@@ -726,16 +724,10 @@ static int snd_fm801_pcm(struct fm801 *chip, int device, struct snd_pcm **rpcm) | |||
726 | snd_dma_pci_data(chip->pci), | 724 | snd_dma_pci_data(chip->pci), |
727 | chip->multichannel ? 128*1024 : 64*1024, 128*1024); | 725 | chip->multichannel ? 128*1024 : 64*1024, 128*1024); |
728 | 726 | ||
729 | err = snd_pcm_add_chmap_ctls(pcm, SNDRV_PCM_STREAM_PLAYBACK, | 727 | return snd_pcm_add_chmap_ctls(pcm, SNDRV_PCM_STREAM_PLAYBACK, |
730 | snd_pcm_alt_chmaps, | 728 | snd_pcm_alt_chmaps, |
731 | chip->multichannel ? 6 : 2, 0, | 729 | chip->multichannel ? 6 : 2, 0, |
732 | NULL); | 730 | NULL); |
733 | if (err < 0) | ||
734 | return err; | ||
735 | |||
736 | if (rpcm) | ||
737 | *rpcm = pcm; | ||
738 | return 0; | ||
739 | } | 731 | } |
740 | 732 | ||
741 | /* | 733 | /* |
@@ -1340,7 +1332,7 @@ static int snd_card_fm801_probe(struct pci_dev *pci, | |||
1340 | if (chip->tea575x_tuner & TUNER_ONLY) | 1332 | if (chip->tea575x_tuner & TUNER_ONLY) |
1341 | goto __fm801_tuner_only; | 1333 | goto __fm801_tuner_only; |
1342 | 1334 | ||
1343 | if ((err = snd_fm801_pcm(chip, 0, NULL)) < 0) { | 1335 | if ((err = snd_fm801_pcm(chip, 0)) < 0) { |
1344 | snd_card_free(card); | 1336 | snd_card_free(card); |
1345 | return err; | 1337 | return err; |
1346 | } | 1338 | } |