summaryrefslogtreecommitdiff
path: root/sound/isa/sb/sb8_main.c
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2015-01-02 11:24:41 (GMT)
committerTakashi Iwai <tiwai@suse.de>2015-01-02 15:28:21 (GMT)
commit8c77629996cbabee1d5b6d9b0d1e97cbca197ba1 (patch)
tree86baafac24bcadfd3c3839ae8a05ddbbc03c0a5f /sound/isa/sb/sb8_main.c
parentf6be4e624aa26699a9a89bc24089e88a227141c1 (diff)
downloadlinux-8c77629996cbabee1d5b6d9b0d1e97cbca197ba1.tar.xz
ALSA: sb8: Remove always NULL parameters
snd_sb8dsp_pcm() and snd_sb8dsp_midi() take a pointer to a pointer of a PCM/MIDI where if this parameter is provided the newly allocated object 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/sb/sb8_main.c')
-rw-r--r--sound/isa/sb/sb8_main.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/sound/isa/sb/sb8_main.c b/sound/isa/sb/sb8_main.c
index 24d4121..d4d8b0e 100644
--- a/sound/isa/sb/sb8_main.c
+++ b/sound/isa/sb/sb8_main.c
@@ -594,15 +594,13 @@ static struct snd_pcm_ops snd_sb8_capture_ops = {
.pointer = snd_sb8_capture_pointer,
};
-int snd_sb8dsp_pcm(struct snd_sb *chip, int device, struct snd_pcm ** rpcm)
+int snd_sb8dsp_pcm(struct snd_sb *chip, int device)
{
struct snd_card *card = chip->card;
struct snd_pcm *pcm;
int err;
size_t max_prealloc = 64 * 1024;
- if (rpcm)
- *rpcm = NULL;
if ((err = snd_pcm_new(card, "SB8 DSP", device, 1, 1, &pcm)) < 0)
return err;
sprintf(pcm->name, "DSP v%i.%i", chip->version >> 8, chip->version & 0xff);
@@ -618,8 +616,6 @@ int snd_sb8dsp_pcm(struct snd_sb *chip, int device, struct snd_pcm ** rpcm)
snd_dma_isa_data(),
64*1024, max_prealloc);
- if (rpcm)
- *rpcm = pcm;
return 0;
}