aboutsummaryrefslogtreecommitdiffstats
path: root/include/sound
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2015-01-02 06:24:43 -0500
committerTakashi Iwai <tiwai@suse.de>2015-01-02 10:30:08 -0500
commitfa60c065694a81e534c61809ab7dd419366e9335 (patch)
treecf48dbdcbfdc171ebad6e34be90d436e676c4e13 /include/sound
parent92533f188862fbefe357ada4e4af67b8e730e680 (diff)
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 'include/sound')
-rw-r--r--include/sound/wss.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/sound/wss.h b/include/sound/wss.h
index 0c7f034f1e86..1823e3a964e2 100644
--- a/include/sound/wss.h
+++ b/include/sound/wss.h
@@ -154,8 +154,8 @@ int snd_wss_create(struct snd_card *card,
154 unsigned short hardware, 154 unsigned short hardware,
155 unsigned short hwshare, 155 unsigned short hwshare,
156 struct snd_wss **rchip); 156 struct snd_wss **rchip);
157int snd_wss_pcm(struct snd_wss *chip, int device, struct snd_pcm **rpcm); 157int snd_wss_pcm(struct snd_wss *chip, int device);
158int snd_wss_timer(struct snd_wss *chip, int device, struct snd_timer **rtimer); 158int snd_wss_timer(struct snd_wss *chip, int device);
159int snd_wss_mixer(struct snd_wss *chip); 159int snd_wss_mixer(struct snd_wss *chip);
160 160
161const struct snd_pcm_ops *snd_wss_get_pcm_ops(int direction); 161const struct snd_pcm_ops *snd_wss_get_pcm_ops(int direction);
@@ -167,7 +167,7 @@ int snd_cs4236_create(struct snd_card *card,
167 unsigned short hardware, 167 unsigned short hardware,
168 unsigned short hwshare, 168 unsigned short hwshare,
169 struct snd_wss **rchip); 169 struct snd_wss **rchip);
170int snd_cs4236_pcm(struct snd_wss *chip, int device, struct snd_pcm **rpcm); 170int snd_cs4236_pcm(struct snd_wss *chip, int device);
171int snd_cs4236_mixer(struct snd_wss *chip); 171int snd_cs4236_mixer(struct snd_wss *chip);
172 172
173/* 173/*