summaryrefslogtreecommitdiffstats
path: root/sound/isa/sscape.c
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2015-01-02 12:24:43 +0100
committerTakashi Iwai <tiwai@suse.de>2015-01-02 16:30:08 +0100
commitfa60c065694a81e534c61809ab7dd419366e9335 (patch)
treecf48dbdcbfdc171ebad6e34be90d436e676c4e13 /sound/isa/sscape.c
parent92533f188862fbefe357ada4e4af67b8e730e680 (diff)
downloadlinux-fa60c065694a81e534c61809ab7dd419366e9335.tar.bz2
ALSA: wss: Remove (almost) always NULL parameters
Most callers of snd_wss_pcm(), snd_wss_timer() and snd_cs4236_pcm() pass NULL as the last parameter, some callers pass a pointer but never use it after the function has been called and only a few callers pass a pointer and actually use it. The later is only the case for snd_wss_pcm() for snd_cs4236_pcm() and it is possible to get the same PCM object by accessing the pcm field of the snd_wss struct that was passed as the first parameter. This function removes the last parameters from the functions mentioned above and updates the callers which used it to use chip->pcm instead. This allows us to slightly simplify the functions since they don't have to check and set the last parameter anymore which makes the code slightly shorter and cleaner. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/isa/sscape.c')
-rw-r--r--sound/isa/sscape.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sound/isa/sscape.c b/sound/isa/sscape.c
index 44405df7d4be..018ab140c2be 100644
--- a/sound/isa/sscape.c
+++ b/sound/isa/sscape.c
@@ -877,7 +877,6 @@ static int create_ad1845(struct snd_card *card, unsigned port,
codec_type, WSS_HWSHARE_DMA1, &chip);
if (!err) {
unsigned long flags;
- struct snd_pcm *pcm;
if (sscape->type != SSCAPE_VIVO) {
/*
@@ -893,7 +892,7 @@ static int create_ad1845(struct snd_card *card, unsigned port,
}
- err = snd_wss_pcm(chip, 0, &pcm);
+ err = snd_wss_pcm(chip, 0);
if (err < 0) {
snd_printk(KERN_ERR "sscape: No PCM device "
"for AD1845 chip\n");
@@ -907,7 +906,7 @@ static int create_ad1845(struct snd_card *card, unsigned port,
goto _error;
}
if (chip->hardware != WSS_HW_AD1848) {
- err = snd_wss_timer(chip, 0, NULL);
+ err = snd_wss_timer(chip, 0);
if (err < 0) {
snd_printk(KERN_ERR "sscape: No timer device "
"for AD1845 chip\n");