diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2015-01-02 06:24:38 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2015-01-02 10:27:24 -0500 |
commit | 1a2515ac94bbb1c409dea2e4a7b011592569b239 (patch) | |
tree | f20dc74a27038284bcd6d0e4724030cd5cf6d218 /sound/isa | |
parent | 4b8ab88518726197c8659bc9aca96c6af01dab57 (diff) |
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>
Diffstat (limited to 'sound/isa')
-rw-r--r-- | sound/isa/es18xx.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/sound/isa/es18xx.c b/sound/isa/es18xx.c index b481bb8c31bc..6cc2d2bbde6a 100644 --- a/sound/isa/es18xx.c +++ b/sound/isa/es18xx.c | |||
@@ -1687,16 +1687,13 @@ static struct snd_pcm_ops snd_es18xx_capture_ops = { | |||
1687 | .pointer = snd_es18xx_capture_pointer, | 1687 | .pointer = snd_es18xx_capture_pointer, |
1688 | }; | 1688 | }; |
1689 | 1689 | ||
1690 | static int snd_es18xx_pcm(struct snd_card *card, int device, | 1690 | static int snd_es18xx_pcm(struct snd_card *card, int device) |
1691 | struct snd_pcm **rpcm) | ||
1692 | { | 1691 | { |
1693 | struct snd_es18xx *chip = card->private_data; | 1692 | struct snd_es18xx *chip = card->private_data; |
1694 | struct snd_pcm *pcm; | 1693 | struct snd_pcm *pcm; |
1695 | char str[16]; | 1694 | char str[16]; |
1696 | int err; | 1695 | int err; |
1697 | 1696 | ||
1698 | if (rpcm) | ||
1699 | *rpcm = NULL; | ||
1700 | sprintf(str, "ES%x", chip->version); | 1697 | sprintf(str, "ES%x", chip->version); |
1701 | if (chip->caps & ES18XX_PCM2) | 1698 | if (chip->caps & ES18XX_PCM2) |
1702 | err = snd_pcm_new(card, str, device, 2, 1, &pcm); | 1699 | 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, | |||
1722 | snd_dma_isa_data(), | 1719 | snd_dma_isa_data(), |
1723 | 64*1024, | 1720 | 64*1024, |
1724 | chip->dma1 > 3 || chip->dma2 > 3 ? 128*1024 : 64*1024); | 1721 | chip->dma1 > 3 || chip->dma2 > 3 ? 128*1024 : 64*1024); |
1725 | |||
1726 | if (rpcm) | ||
1727 | *rpcm = pcm; | ||
1728 | return 0; | 1722 | return 0; |
1729 | } | 1723 | } |
1730 | 1724 | ||
@@ -2154,7 +2148,7 @@ static int snd_audiodrive_probe(struct snd_card *card, int dev) | |||
2154 | chip->port, | 2148 | chip->port, |
2155 | irq[dev], dma1[dev]); | 2149 | irq[dev], dma1[dev]); |
2156 | 2150 | ||
2157 | err = snd_es18xx_pcm(card, 0, NULL); | 2151 | err = snd_es18xx_pcm(card, 0); |
2158 | if (err < 0) | 2152 | if (err < 0) |
2159 | return err; | 2153 | return err; |
2160 | 2154 | ||