summaryrefslogtreecommitdiffstats
path: root/sound/drivers/ml403-ac97cr.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/drivers/ml403-ac97cr.c')
-rw-r--r--sound/drivers/ml403-ac97cr.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/sound/drivers/ml403-ac97cr.c b/sound/drivers/ml403-ac97cr.c
index bcca825a1c8d..bdcb5721393b 100644
--- a/sound/drivers/ml403-ac97cr.c
+++ b/sound/drivers/ml403-ac97cr.c
@@ -1094,8 +1094,7 @@ static int snd_ml403_ac97cr_free(struct snd_ml403_ac97cr *ml403_ac97cr)
1094 if (ml403_ac97cr->capture_irq >= 0) 1094 if (ml403_ac97cr->capture_irq >= 0)
1095 free_irq(ml403_ac97cr->capture_irq, ml403_ac97cr); 1095 free_irq(ml403_ac97cr->capture_irq, ml403_ac97cr);
1096 /* give back "port" */ 1096 /* give back "port" */
1097 if (ml403_ac97cr->port != NULL) 1097 iounmap(ml403_ac97cr->port);
1098 iounmap(ml403_ac97cr->port);
1099 kfree(ml403_ac97cr); 1098 kfree(ml403_ac97cr);
1100 PDEBUG(INIT_INFO, "free(): (done)\n"); 1099 PDEBUG(INIT_INFO, "free(): (done)\n");
1101 return 0; 1100 return 0;
@@ -1238,14 +1237,11 @@ snd_ml403_ac97cr_mixer(struct snd_ml403_ac97cr *ml403_ac97cr)
1238} 1237}
1239 1238
1240static int 1239static int
1241snd_ml403_ac97cr_pcm(struct snd_ml403_ac97cr *ml403_ac97cr, int device, 1240snd_ml403_ac97cr_pcm(struct snd_ml403_ac97cr *ml403_ac97cr, int device)
1242 struct snd_pcm **rpcm)
1243{ 1241{
1244 struct snd_pcm *pcm; 1242 struct snd_pcm *pcm;
1245 int err; 1243 int err;
1246 1244
1247 if (rpcm)
1248 *rpcm = NULL;
1249 err = snd_pcm_new(ml403_ac97cr->card, "ML403AC97CR/1", device, 1, 1, 1245 err = snd_pcm_new(ml403_ac97cr->card, "ML403AC97CR/1", device, 1, 1,
1250 &pcm); 1246 &pcm);
1251 if (err < 0) 1247 if (err < 0)
@@ -1263,8 +1259,6 @@ snd_ml403_ac97cr_pcm(struct snd_ml403_ac97cr *ml403_ac97cr, int device,
1263 snd_dma_continuous_data(GFP_KERNEL), 1259 snd_dma_continuous_data(GFP_KERNEL),
1264 64 * 1024, 1260 64 * 1024,
1265 128 * 1024); 1261 128 * 1024);
1266 if (rpcm)
1267 *rpcm = pcm;
1268 return 0; 1262 return 0;
1269} 1263}
1270 1264
@@ -1298,7 +1292,7 @@ static int snd_ml403_ac97cr_probe(struct platform_device *pfdev)
1298 return err; 1292 return err;
1299 } 1293 }
1300 PDEBUG(INIT_INFO, "probe(): mixer done\n"); 1294 PDEBUG(INIT_INFO, "probe(): mixer done\n");
1301 err = snd_ml403_ac97cr_pcm(ml403_ac97cr, 0, NULL); 1295 err = snd_ml403_ac97cr_pcm(ml403_ac97cr, 0);
1302 if (err < 0) { 1296 if (err < 0) {
1303 snd_card_free(card); 1297 snd_card_free(card);
1304 return err; 1298 return err;