summaryrefslogtreecommitdiff
path: root/sound/isa/gus
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@alsa3.local>2008-12-28 16:43:35 +0100
committerTakashi Iwai <tiwai@suse.de>2009-01-12 15:20:26 +0100
commitc95eadd2f1afd2ba643e85a8dfc9079a3f03ae47 (patch)
tree1fb2defba2bf3d4c299395b0f46d7902eb3b51ba /sound/isa/gus
parent53fb1e63599438bd5f6fbb852023d80916d83983 (diff)
ALSA: Convert to snd_card_create() in sound/isa/*
Convert from snd_card_new() to the new snd_card_create() function. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/isa/gus')
-rw-r--r--sound/isa/gus/gusclassic.c6
-rw-r--r--sound/isa/gus/gusextreme.c6
-rw-r--r--sound/isa/gus/gusmax.c8
-rw-r--r--sound/isa/gus/interwave.c7
4 files changed, 14 insertions, 13 deletions
diff --git a/sound/isa/gus/gusclassic.c b/sound/isa/gus/gusclassic.c
index 426532a4d730..086b8f0e0f94 100644
--- a/sound/isa/gus/gusclassic.c
+++ b/sound/isa/gus/gusclassic.c
@@ -148,9 +148,9 @@ static int __devinit snd_gusclassic_probe(struct device *dev, unsigned int n)
struct snd_gus_card *gus;
int error;
- card = snd_card_new(index[n], id[n], THIS_MODULE, 0);
- if (!card)
- return -EINVAL;
+ error = snd_card_create(index[n], id[n], THIS_MODULE, 0, &card);
+ if (error < 0)
+ return error;
if (pcm_channels[n] < 2)
pcm_channels[n] = 2;
diff --git a/sound/isa/gus/gusextreme.c b/sound/isa/gus/gusextreme.c
index 7ad4c3b41a84..180a8dea6bd9 100644
--- a/sound/isa/gus/gusextreme.c
+++ b/sound/isa/gus/gusextreme.c
@@ -241,9 +241,9 @@ static int __devinit snd_gusextreme_probe(struct device *dev, unsigned int n)
struct snd_opl3 *opl3;
int error;
- card = snd_card_new(index[n], id[n], THIS_MODULE, 0);
- if (!card)
- return -EINVAL;
+ error = snd_card_create(index[n], id[n], THIS_MODULE, 0, &card);
+ if (error < 0)
+ return error;
if (mpu_port[n] == SNDRV_AUTO_PORT)
mpu_port[n] = 0;
diff --git a/sound/isa/gus/gusmax.c b/sound/isa/gus/gusmax.c
index f94c1976e632..f26eac8d8110 100644
--- a/sound/isa/gus/gusmax.c
+++ b/sound/isa/gus/gusmax.c
@@ -214,10 +214,10 @@ static int __devinit snd_gusmax_probe(struct device *pdev, unsigned int dev)
struct snd_wss *wss;
struct snd_gusmax *maxcard;
- card = snd_card_new(index[dev], id[dev], THIS_MODULE,
- sizeof(struct snd_gusmax));
- if (card == NULL)
- return -ENOMEM;
+ err = snd_card_create(index[dev], id[dev], THIS_MODULE,
+ sizeof(struct snd_gusmax), &card);
+ if (err < 0)
+ return err;
card->private_free = snd_gusmax_free;
maxcard = (struct snd_gusmax *)card->private_data;
maxcard->card = card;
diff --git a/sound/isa/gus/interwave.c b/sound/isa/gus/interwave.c
index 5faecfb602d3..e040c7638911 100644
--- a/sound/isa/gus/interwave.c
+++ b/sound/isa/gus/interwave.c
@@ -630,10 +630,11 @@ static struct snd_card *snd_interwave_card_new(int dev)
{
struct snd_card *card;
struct snd_interwave *iwcard;
+ int err;
- card = snd_card_new(index[dev], id[dev], THIS_MODULE,
- sizeof(struct snd_interwave));
- if (card == NULL)
+ err = snd_card_create(index[dev], id[dev], THIS_MODULE,
+ sizeof(struct snd_interwave), &card);
+ if (err < 0)
return NULL;
iwcard = card->private_data;
iwcard->card = card;