aboutsummaryrefslogtreecommitdiffstats
path: root/sound/isa/opti9xx/miro.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/isa/opti9xx/miro.c')
-rw-r--r--sound/isa/opti9xx/miro.c28
1 files changed, 16 insertions, 12 deletions
diff --git a/sound/isa/opti9xx/miro.c b/sound/isa/opti9xx/miro.c
index 2a1e2f5d12c2..440755cc0013 100644
--- a/sound/isa/opti9xx/miro.c
+++ b/sound/isa/opti9xx/miro.c
@@ -32,7 +32,7 @@
32#include <asm/io.h> 32#include <asm/io.h>
33#include <asm/dma.h> 33#include <asm/dma.h>
34#include <sound/core.h> 34#include <sound/core.h>
35#include <sound/cs4231.h> 35#include <sound/wss.h>
36#include <sound/mpu401.h> 36#include <sound/mpu401.h>
37#include <sound/opl4.h> 37#include <sound/opl4.h>
38#include <sound/control.h> 38#include <sound/control.h>
@@ -675,7 +675,8 @@ static int __devinit snd_miro_mixer(struct snd_miro *miro)
675 unsigned int idx; 675 unsigned int idx;
676 int err; 676 int err;
677 677
678 snd_assert(miro != NULL && miro->card != NULL, return -EINVAL); 678 if (snd_BUG_ON(!miro || !miro->card))
679 return -EINVAL;
679 680
680 card = miro->card; 681 card = miro->card;
681 682
@@ -1221,7 +1222,7 @@ static int __devinit snd_miro_probe(struct device *devptr, unsigned int n)
1221 1222
1222 int error; 1223 int error;
1223 struct snd_miro *miro; 1224 struct snd_miro *miro;
1224 struct snd_cs4231 *codec; 1225 struct snd_wss *codec;
1225 struct snd_timer *timer; 1226 struct snd_timer *timer;
1226 struct snd_card *card; 1227 struct snd_card *card;
1227 struct snd_pcm *pcm; 1228 struct snd_pcm *pcm;
@@ -1310,29 +1311,32 @@ static int __devinit snd_miro_probe(struct device *devptr, unsigned int n)
1310 } 1311 }
1311 } 1312 }
1312 1313
1313 if ((error = snd_miro_configure(miro))) { 1314 error = snd_miro_configure(miro);
1315 if (error) {
1314 snd_card_free(card); 1316 snd_card_free(card);
1315 return error; 1317 return error;
1316 } 1318 }
1317 1319
1318 if ((error = snd_cs4231_create(card, miro->wss_base + 4, -1, 1320 error = snd_wss_create(card, miro->wss_base + 4, -1,
1319 miro->irq, miro->dma1, miro->dma2, 1321 miro->irq, miro->dma1, miro->dma2,
1320 CS4231_HW_AD1845, 1322 WSS_HW_AD1845, 0, &codec);
1321 0, 1323 if (error < 0) {
1322 &codec)) < 0) {
1323 snd_card_free(card); 1324 snd_card_free(card);
1324 return error; 1325 return error;
1325 } 1326 }
1326 1327
1327 if ((error = snd_cs4231_pcm(codec, 0, &pcm)) < 0) { 1328 error = snd_wss_pcm(codec, 0, &pcm);
1329 if (error < 0) {
1328 snd_card_free(card); 1330 snd_card_free(card);
1329 return error; 1331 return error;
1330 } 1332 }
1331 if ((error = snd_cs4231_mixer(codec)) < 0) { 1333 error = snd_wss_mixer(codec);
1334 if (error < 0) {
1332 snd_card_free(card); 1335 snd_card_free(card);
1333 return error; 1336 return error;
1334 } 1337 }
1335 if ((error = snd_cs4231_timer(codec, 0, &timer)) < 0) { 1338 error = snd_wss_timer(codec, 0, &timer);
1339 if (error < 0) {
1336 snd_card_free(card); 1340 snd_card_free(card);
1337 return error; 1341 return error;
1338 } 1342 }