diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2015-01-02 06:24:35 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2015-01-02 10:25:53 -0500 |
commit | e9dd86267f2571a9649399c9e268266ca5aa6152 (patch) | |
tree | 94155e0053261840c8785c3388a0193f14d945d7 | |
parent | c9a458519dd69eb512a074f920a81d4906548306 (diff) |
ALSA: ml403-ac97cr: Remove always NULL parameter
snd_ml403_ac97cr_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/drivers/ml403-ac97cr.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/sound/drivers/ml403-ac97cr.c b/sound/drivers/ml403-ac97cr.c index bcca825a1c8d..ec01de1cb23b 100644 --- a/sound/drivers/ml403-ac97cr.c +++ b/sound/drivers/ml403-ac97cr.c | |||
@@ -1238,14 +1238,11 @@ snd_ml403_ac97cr_mixer(struct snd_ml403_ac97cr *ml403_ac97cr) | |||
1238 | } | 1238 | } |
1239 | 1239 | ||
1240 | static int | 1240 | static int |
1241 | snd_ml403_ac97cr_pcm(struct snd_ml403_ac97cr *ml403_ac97cr, int device, | 1241 | snd_ml403_ac97cr_pcm(struct snd_ml403_ac97cr *ml403_ac97cr, int device) |
1242 | struct snd_pcm **rpcm) | ||
1243 | { | 1242 | { |
1244 | struct snd_pcm *pcm; | 1243 | struct snd_pcm *pcm; |
1245 | int err; | 1244 | int err; |
1246 | 1245 | ||
1247 | if (rpcm) | ||
1248 | *rpcm = NULL; | ||
1249 | err = snd_pcm_new(ml403_ac97cr->card, "ML403AC97CR/1", device, 1, 1, | 1246 | err = snd_pcm_new(ml403_ac97cr->card, "ML403AC97CR/1", device, 1, 1, |
1250 | &pcm); | 1247 | &pcm); |
1251 | if (err < 0) | 1248 | if (err < 0) |
@@ -1263,8 +1260,6 @@ snd_ml403_ac97cr_pcm(struct snd_ml403_ac97cr *ml403_ac97cr, int device, | |||
1263 | snd_dma_continuous_data(GFP_KERNEL), | 1260 | snd_dma_continuous_data(GFP_KERNEL), |
1264 | 64 * 1024, | 1261 | 64 * 1024, |
1265 | 128 * 1024); | 1262 | 128 * 1024); |
1266 | if (rpcm) | ||
1267 | *rpcm = pcm; | ||
1268 | return 0; | 1263 | return 0; |
1269 | } | 1264 | } |
1270 | 1265 | ||
@@ -1298,7 +1293,7 @@ static int snd_ml403_ac97cr_probe(struct platform_device *pfdev) | |||
1298 | return err; | 1293 | return err; |
1299 | } | 1294 | } |
1300 | PDEBUG(INIT_INFO, "probe(): mixer done\n"); | 1295 | PDEBUG(INIT_INFO, "probe(): mixer done\n"); |
1301 | err = snd_ml403_ac97cr_pcm(ml403_ac97cr, 0, NULL); | 1296 | err = snd_ml403_ac97cr_pcm(ml403_ac97cr, 0); |
1302 | if (err < 0) { | 1297 | if (err < 0) { |
1303 | snd_card_free(card); | 1298 | snd_card_free(card); |
1304 | return err; | 1299 | return err; |