Commit c95eadd2 authored by Takashi Iwai's avatar Takashi Iwai Committed by Takashi Iwai

ALSA: Convert to snd_card_create() in sound/isa/*

Convert from snd_card_new() to the new snd_card_create() function.
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 53fb1e63
...@@ -157,9 +157,10 @@ static int __devinit snd_card_ad1816a_probe(int dev, struct pnp_card_link *pcard ...@@ -157,9 +157,10 @@ static int __devinit snd_card_ad1816a_probe(int dev, struct pnp_card_link *pcard
struct snd_ad1816a *chip; struct snd_ad1816a *chip;
struct snd_opl3 *opl3; struct snd_opl3 *opl3;
if ((card = snd_card_new(index[dev], id[dev], THIS_MODULE, error = snd_card_create(index[dev], id[dev], THIS_MODULE,
sizeof(struct snd_card_ad1816a))) == NULL) sizeof(struct snd_card_ad1816a), &card);
return -ENOMEM; if (error < 0)
return error;
acard = (struct snd_card_ad1816a *)card->private_data; acard = (struct snd_card_ad1816a *)card->private_data;
if ((error = snd_card_ad1816a_pnp(dev, acard, pcard, pid))) { if ((error = snd_card_ad1816a_pnp(dev, acard, pcard, pid))) {
......
...@@ -91,9 +91,9 @@ static int __devinit snd_ad1848_probe(struct device *dev, unsigned int n) ...@@ -91,9 +91,9 @@ static int __devinit snd_ad1848_probe(struct device *dev, unsigned int n)
struct snd_pcm *pcm; struct snd_pcm *pcm;
int error; int error;
card = snd_card_new(index[n], id[n], THIS_MODULE, 0); error = snd_card_create(index[n], id[n], THIS_MODULE, 0, &card);
if (!card) if (error < 0)
return -EINVAL; return error;
error = snd_wss_create(card, port[n], -1, irq[n], dma1[n], -1, error = snd_wss_create(card, port[n], -1, irq[n], dma1[n], -1,
thinkpad[n] ? WSS_HW_THINKPAD : WSS_HW_DETECT, thinkpad[n] ? WSS_HW_THINKPAD : WSS_HW_DETECT,
......
...@@ -53,10 +53,10 @@ static int __devinit snd_adlib_probe(struct device *dev, unsigned int n) ...@@ -53,10 +53,10 @@ static int __devinit snd_adlib_probe(struct device *dev, unsigned int n)
struct snd_opl3 *opl3; struct snd_opl3 *opl3;
int error; int error;
card = snd_card_new(index[n], id[n], THIS_MODULE, 0); error = snd_card_create(index[n], id[n], THIS_MODULE, 0, &card);
if (!card) { if (error < 0) {
dev_err(dev, "could not create card\n"); dev_err(dev, "could not create card\n");
return -EINVAL; return error;
} }
card->private_data = request_region(port[n], 4, CRD_NAME); card->private_data = request_region(port[n], 4, CRD_NAME);
......
...@@ -163,9 +163,10 @@ static int __devinit snd_card_als100_probe(int dev, ...@@ -163,9 +163,10 @@ static int __devinit snd_card_als100_probe(int dev,
struct snd_card_als100 *acard; struct snd_card_als100 *acard;
struct snd_opl3 *opl3; struct snd_opl3 *opl3;
if ((card = snd_card_new(index[dev], id[dev], THIS_MODULE, error = snd_card_create(index[dev], id[dev], THIS_MODULE,
sizeof(struct snd_card_als100))) == NULL) sizeof(struct snd_card_als100), &card);
return -ENOMEM; if (error < 0)
return error;
acard = card->private_data; acard = card->private_data;
if ((error = snd_card_als100_pnp(dev, acard, pcard, pid))) { if ((error = snd_card_als100_pnp(dev, acard, pcard, pid))) {
......
...@@ -184,9 +184,10 @@ static int __devinit snd_card_azt2320_probe(int dev, ...@@ -184,9 +184,10 @@ static int __devinit snd_card_azt2320_probe(int dev,
struct snd_wss *chip; struct snd_wss *chip;
struct snd_opl3 *opl3; struct snd_opl3 *opl3;
if ((card = snd_card_new(index[dev], id[dev], THIS_MODULE, error = snd_card_create(index[dev], id[dev], THIS_MODULE,
sizeof(struct snd_card_azt2320))) == NULL) sizeof(struct snd_card_azt2320), &card);
return -ENOMEM; if (error < 0)
return error;
acard = (struct snd_card_azt2320 *)card->private_data; acard = (struct snd_card_azt2320 *)card->private_data;
if ((error = snd_card_azt2320_pnp(dev, acard, pcard, pid))) { if ((error = snd_card_azt2320_pnp(dev, acard, pcard, pid))) {
......
...@@ -467,20 +467,22 @@ static int snd_cmi8330_resume(struct snd_card *card) ...@@ -467,20 +467,22 @@ static int snd_cmi8330_resume(struct snd_card *card)
#define PFX "cmi8330: " #define PFX "cmi8330: "
static struct snd_card *snd_cmi8330_card_new(int dev) static int snd_cmi8330_card_new(int dev, struct snd_card **cardp)
{ {
struct snd_card *card; struct snd_card *card;
struct snd_cmi8330 *acard; struct snd_cmi8330 *acard;
int err;
card = snd_card_new(index[dev], id[dev], THIS_MODULE, err = snd_card_create(index[dev], id[dev], THIS_MODULE,
sizeof(struct snd_cmi8330)); sizeof(struct snd_cmi8330), &card);
if (card == NULL) { if (err < 0) {
snd_printk(KERN_ERR PFX "could not get a new card\n"); snd_printk(KERN_ERR PFX "could not get a new card\n");
return NULL; return err;
} }
acard = card->private_data; acard = card->private_data;
acard->card = card; acard->card = card;
return card; *cardp = card;
return 0;
} }
static int __devinit snd_cmi8330_probe(struct snd_card *card, int dev) static int __devinit snd_cmi8330_probe(struct snd_card *card, int dev)
...@@ -564,9 +566,9 @@ static int __devinit snd_cmi8330_isa_probe(struct device *pdev, ...@@ -564,9 +566,9 @@ static int __devinit snd_cmi8330_isa_probe(struct device *pdev,
struct snd_card *card; struct snd_card *card;
int err; int err;
card = snd_cmi8330_card_new(dev); err = snd_cmi8330_card_new(dev, &card);
if (! card) if (err < 0)
return -ENOMEM; return err;
snd_card_set_dev(card, pdev); snd_card_set_dev(card, pdev);
if ((err = snd_cmi8330_probe(card, dev)) < 0) { if ((err = snd_cmi8330_probe(card, dev)) < 0) {
snd_card_free(card); snd_card_free(card);
...@@ -628,9 +630,9 @@ static int __devinit snd_cmi8330_pnp_detect(struct pnp_card_link *pcard, ...@@ -628,9 +630,9 @@ static int __devinit snd_cmi8330_pnp_detect(struct pnp_card_link *pcard,
if (dev >= SNDRV_CARDS) if (dev >= SNDRV_CARDS)
return -ENODEV; return -ENODEV;
card = snd_cmi8330_card_new(dev); res = snd_cmi8330_card_new(dev, &card);
if (! card) if (res < 0)
return -ENOMEM; return res;
if ((res = snd_cmi8330_pnp(dev, card->private_data, pcard, pid)) < 0) { if ((res = snd_cmi8330_pnp(dev, card->private_data, pcard, pid)) < 0) {
snd_printk(KERN_ERR PFX "PnP detection failed\n"); snd_printk(KERN_ERR PFX "PnP detection failed\n");
snd_card_free(card); snd_card_free(card);
......
...@@ -95,9 +95,9 @@ static int __devinit snd_cs4231_probe(struct device *dev, unsigned int n) ...@@ -95,9 +95,9 @@ static int __devinit snd_cs4231_probe(struct device *dev, unsigned int n)
struct snd_pcm *pcm; struct snd_pcm *pcm;
int error; int error;
card = snd_card_new(index[n], id[n], THIS_MODULE, 0); error = snd_card_create(index[n], id[n], THIS_MODULE, 0, &card);
if (!card) if (error < 0)
return -EINVAL; return error;
error = snd_wss_create(card, port[n], -1, irq[n], dma1[n], dma2[n], error = snd_wss_create(card, port[n], -1, irq[n], dma1[n], dma2[n],
WSS_HW_DETECT, 0, &chip); WSS_HW_DETECT, 0, &chip);
......
...@@ -385,10 +385,11 @@ static void snd_card_cs4236_free(struct snd_card *card) ...@@ -385,10 +385,11 @@ static void snd_card_cs4236_free(struct snd_card *card)
static struct snd_card *snd_cs423x_card_new(int dev) static struct snd_card *snd_cs423x_card_new(int dev)
{ {
struct snd_card *card; struct snd_card *card;
int err;
card = snd_card_new(index[dev], id[dev], THIS_MODULE, err = snd_card_create(index[dev], id[dev], THIS_MODULE,
sizeof(struct snd_card_cs4236)); sizeof(struct snd_card_cs4236), &card);
if (card == NULL) if (err < 0)
return NULL; return NULL;
card->private_free = snd_card_cs4236_free; card->private_free = snd_card_cs4236_free;
return card; return card;
......
...@@ -150,9 +150,10 @@ static int __devinit snd_card_dt019x_probe(int dev, struct pnp_card_link *pcard, ...@@ -150,9 +150,10 @@ static int __devinit snd_card_dt019x_probe(int dev, struct pnp_card_link *pcard,
struct snd_card_dt019x *acard; struct snd_card_dt019x *acard;
struct snd_opl3 *opl3; struct snd_opl3 *opl3;
if ((card = snd_card_new(index[dev], id[dev], THIS_MODULE, error = snd_card_create(index[dev], id[dev], THIS_MODULE,
sizeof(struct snd_card_dt019x))) == NULL) sizeof(struct snd_card_dt019x), &card);
return -ENOMEM; if (error < 0)
return error;
acard = card->private_data; acard = card->private_data;
snd_card_set_dev(card, &pcard->card->dev); snd_card_set_dev(card, &pcard->card->dev);
......
...@@ -122,9 +122,9 @@ static int __devinit snd_es1688_probe(struct device *dev, unsigned int n) ...@@ -122,9 +122,9 @@ static int __devinit snd_es1688_probe(struct device *dev, unsigned int n)
struct snd_pcm *pcm; struct snd_pcm *pcm;
int error; int error;
card = snd_card_new(index[n], id[n], THIS_MODULE, 0); error = snd_card_create(index[n], id[n], THIS_MODULE, 0, &card);
if (!card) if (error < 0)
return -EINVAL; return error;
error = snd_es1688_legacy_create(card, dev, n, &chip); error = snd_es1688_legacy_create(card, dev, n, &chip);
if (error < 0) if (error < 0)
......
...@@ -2127,8 +2127,11 @@ static int __devinit snd_audiodrive_pnpc(int dev, struct snd_audiodrive *acard, ...@@ -2127,8 +2127,11 @@ static int __devinit snd_audiodrive_pnpc(int dev, struct snd_audiodrive *acard,
static struct snd_card *snd_es18xx_card_new(int dev) static struct snd_card *snd_es18xx_card_new(int dev)
{ {
return snd_card_new(index[dev], id[dev], THIS_MODULE, struct snd_card *card;
sizeof(struct snd_audiodrive)); if (snd_card_create(index[dev], id[dev], THIS_MODULE,
sizeof(struct snd_audiodrive), &card) < 0)
return NULL;
return card;
} }
static int __devinit snd_audiodrive_probe(struct snd_card *card, int dev) static int __devinit snd_audiodrive_probe(struct snd_card *card, int dev)
......
...@@ -148,9 +148,9 @@ static int __devinit snd_gusclassic_probe(struct device *dev, unsigned int n) ...@@ -148,9 +148,9 @@ static int __devinit snd_gusclassic_probe(struct device *dev, unsigned int n)
struct snd_gus_card *gus; struct snd_gus_card *gus;
int error; int error;
card = snd_card_new(index[n], id[n], THIS_MODULE, 0); error = snd_card_create(index[n], id[n], THIS_MODULE, 0, &card);
if (!card) if (error < 0)
return -EINVAL; return error;
if (pcm_channels[n] < 2) if (pcm_channels[n] < 2)
pcm_channels[n] = 2; pcm_channels[n] = 2;
......
...@@ -241,9 +241,9 @@ static int __devinit snd_gusextreme_probe(struct device *dev, unsigned int n) ...@@ -241,9 +241,9 @@ static int __devinit snd_gusextreme_probe(struct device *dev, unsigned int n)
struct snd_opl3 *opl3; struct snd_opl3 *opl3;
int error; int error;
card = snd_card_new(index[n], id[n], THIS_MODULE, 0); error = snd_card_create(index[n], id[n], THIS_MODULE, 0, &card);
if (!card) if (error < 0)
return -EINVAL; return error;
if (mpu_port[n] == SNDRV_AUTO_PORT) if (mpu_port[n] == SNDRV_AUTO_PORT)
mpu_port[n] = 0; mpu_port[n] = 0;
......
...@@ -214,10 +214,10 @@ static int __devinit snd_gusmax_probe(struct device *pdev, unsigned int dev) ...@@ -214,10 +214,10 @@ static int __devinit snd_gusmax_probe(struct device *pdev, unsigned int dev)
struct snd_wss *wss; struct snd_wss *wss;
struct snd_gusmax *maxcard; struct snd_gusmax *maxcard;
card = snd_card_new(index[dev], id[dev], THIS_MODULE, err = snd_card_create(index[dev], id[dev], THIS_MODULE,
sizeof(struct snd_gusmax)); sizeof(struct snd_gusmax), &card);
if (card == NULL) if (err < 0)
return -ENOMEM; return err;
card->private_free = snd_gusmax_free; card->private_free = snd_gusmax_free;
maxcard = (struct snd_gusmax *)card->private_data; maxcard = (struct snd_gusmax *)card->private_data;
maxcard->card = card; maxcard->card = card;
......
...@@ -630,10 +630,11 @@ static struct snd_card *snd_interwave_card_new(int dev) ...@@ -630,10 +630,11 @@ static struct snd_card *snd_interwave_card_new(int dev)
{ {
struct snd_card *card; struct snd_card *card;
struct snd_interwave *iwcard; struct snd_interwave *iwcard;
int err;
card = snd_card_new(index[dev], id[dev], THIS_MODULE, err = snd_card_create(index[dev], id[dev], THIS_MODULE,
sizeof(struct snd_interwave)); sizeof(struct snd_interwave), &card);
if (card == NULL) if (err < 0)
return NULL; return NULL;
iwcard = card->private_data; iwcard = card->private_data;
iwcard->card = card; iwcard->card = card;
......
...@@ -617,21 +617,24 @@ static void snd_opl3sa2_free(struct snd_card *card) ...@@ -617,21 +617,24 @@ static void snd_opl3sa2_free(struct snd_card *card)
release_and_free_resource(chip->res_port); release_and_free_resource(chip->res_port);
} }
static struct snd_card *snd_opl3sa2_card_new(int dev) static int snd_opl3sa2_card_new(int dev, struct snd_card **cardp)
{ {
struct snd_card *card; struct snd_card *card;
struct snd_opl3sa2 *chip; struct snd_opl3sa2 *chip;
int err;
card = snd_card_new(index[dev], id[dev], THIS_MODULE, sizeof(struct snd_opl3sa2)); err = snd_card_create(index[dev], id[dev], THIS_MODULE,
if (card == NULL) sizeof(struct snd_opl3sa2), &card);
return NULL; if (err < 0)
return err;
strcpy(card->driver, "OPL3SA2"); strcpy(card->driver, "OPL3SA2");
strcpy(card->shortname, "Yamaha OPL3-SA2"); strcpy(card->shortname, "Yamaha OPL3-SA2");
chip = card->private_data; chip = card->private_data;
spin_lock_init(&chip->reg_lock); spin_lock_init(&chip->reg_lock);
chip->irq = -1; chip->irq = -1;
card->private_free = snd_opl3sa2_free; card->private_free = snd_opl3sa2_free;
return card; *cardp = card;
return 0;
} }
static int __devinit snd_opl3sa2_probe(struct snd_card *card, int dev) static int __devinit snd_opl3sa2_probe(struct snd_card *card, int dev)
...@@ -723,9 +726,9 @@ static int __devinit snd_opl3sa2_pnp_detect(struct pnp_dev *pdev, ...@@ -723,9 +726,9 @@ static int __devinit snd_opl3sa2_pnp_detect(struct pnp_dev *pdev,
if (dev >= SNDRV_CARDS) if (dev >= SNDRV_CARDS)
return -ENODEV; return -ENODEV;
card = snd_opl3sa2_card_new(dev); err = snd_opl3sa2_card_new(dev, &card);
if (! card) if (err < 0)
return -ENOMEM; return err;
if ((err = snd_opl3sa2_pnp(dev, card->private_data, pdev)) < 0) { if ((err = snd_opl3sa2_pnp(dev, card->private_data, pdev)) < 0) {
snd_card_free(card); snd_card_free(card);
return err; return err;
...@@ -789,9 +792,9 @@ static int __devinit snd_opl3sa2_pnp_cdetect(struct pnp_card_link *pcard, ...@@ -789,9 +792,9 @@ static int __devinit snd_opl3sa2_pnp_cdetect(struct pnp_card_link *pcard,
if (dev >= SNDRV_CARDS) if (dev >= SNDRV_CARDS)
return -ENODEV; return -ENODEV;
card = snd_opl3sa2_card_new(dev); err = snd_opl3sa2_card_new(dev, &card);
if (! card) if (err < 0)
return -ENOMEM; return err;
if ((err = snd_opl3sa2_pnp(dev, card->private_data, pdev)) < 0) { if ((err = snd_opl3sa2_pnp(dev, card->private_data, pdev)) < 0) {
snd_card_free(card); snd_card_free(card);
return err; return err;
...@@ -870,9 +873,9 @@ static int __devinit snd_opl3sa2_isa_probe(struct device *pdev, ...@@ -870,9 +873,9 @@ static int __devinit snd_opl3sa2_isa_probe(struct device *pdev,
struct snd_card *card; struct snd_card *card;
int err; int err;
card = snd_opl3sa2_card_new(dev); err = snd_opl3sa2_card_new(dev, &card);
if (! card) if (err < 0)
return -ENOMEM; return err;
snd_card_set_dev(card, pdev); snd_card_set_dev(card, pdev);
if ((err = snd_opl3sa2_probe(card, dev)) < 0) { if ((err = snd_opl3sa2_probe(card, dev)) < 0) {
snd_card_free(card); snd_card_free(card);
......
...@@ -1228,9 +1228,10 @@ static int __devinit snd_miro_probe(struct device *devptr, unsigned int n) ...@@ -1228,9 +1228,10 @@ static int __devinit snd_miro_probe(struct device *devptr, unsigned int n)
struct snd_pcm *pcm; struct snd_pcm *pcm;
struct snd_rawmidi *rmidi; struct snd_rawmidi *rmidi;
if (!(card = snd_card_new(index, id, THIS_MODULE, error = snd_card_create(index, id, THIS_MODULE,
sizeof(struct snd_miro)))) sizeof(struct snd_miro), &card);
return -ENOMEM; if (error < 0)
return error;
card->private_free = snd_card_miro_free; card->private_free = snd_card_miro_free;
miro = card->private_data; miro = card->private_data;
......
...@@ -833,9 +833,11 @@ static int __devinit snd_opti9xx_probe(struct snd_card *card) ...@@ -833,9 +833,11 @@ static int __devinit snd_opti9xx_probe(struct snd_card *card)
static struct snd_card *snd_opti9xx_card_new(void) static struct snd_card *snd_opti9xx_card_new(void)
{ {
struct snd_card *card; struct snd_card *card;
int err;
card = snd_card_new(index, id, THIS_MODULE, sizeof(struct snd_opti9xx)); err = snd_card_create(index, id, THIS_MODULE,
if (! card) sizeof(struct snd_opti9xx), &card);
if (err < 0)
return NULL; return NULL;
card->private_free = snd_card_opti9xx_free; card->private_free = snd_card_opti9xx_free;
return card; return card;
......
...@@ -108,9 +108,10 @@ static int __devinit snd_card_es968_probe(int dev, ...@@ -108,9 +108,10 @@ static int __devinit snd_card_es968_probe(int dev,
struct snd_card *card; struct snd_card *card;
struct snd_card_es968 *acard; struct snd_card_es968 *acard;
if ((card = snd_card_new(index[dev], id[dev], THIS_MODULE, error = snd_card_create(index[dev], id[dev], THIS_MODULE,
sizeof(struct snd_card_es968))) == NULL) sizeof(struct snd_card_es968), &card);
return -ENOMEM; if (error < 0)
return error;
acard = card->private_data; acard = card->private_data;
if ((error = snd_card_es968_pnp(dev, acard, pcard, pid))) { if ((error = snd_card_es968_pnp(dev, acard, pcard, pid))) {
snd_card_free(card); snd_card_free(card);
......
...@@ -326,9 +326,12 @@ static void snd_sb16_free(struct snd_card *card) ...@@ -326,9 +326,12 @@ static void snd_sb16_free(struct snd_card *card)
static struct snd_card *snd_sb16_card_new(int dev) static struct snd_card *snd_sb16_card_new(int dev)
{ {
struct snd_card *card = snd_card_new(index[dev], id[dev], THIS_MODULE, struct snd_card *card;
sizeof(struct snd_card_sb16)); int err;
if (card == NULL)
err = snd_card_create(index[dev], id[dev], THIS_MODULE,
sizeof(struct snd_card_sb16), &card);
if (err < 0)
return NULL; return NULL;
card->private_free = snd_sb16_free; card->private_free = snd_sb16_free;
return card; return card;
......
...@@ -103,10 +103,10 @@ static int __devinit snd_sb8_probe(struct device *pdev, unsigned int dev) ...@@ -103,10 +103,10 @@ static int __devinit snd_sb8_probe(struct device *pdev, unsigned int dev)
struct snd_opl3 *opl3; struct snd_opl3 *opl3;
int err; int err;
card = snd_card_new(index[dev], id[dev], THIS_MODULE, err = snd_card_create(index[dev], id[dev], THIS_MODULE,
sizeof(struct snd_sb8)); sizeof(struct snd_sb8), &card);
if (card == NULL) if (err < 0)
return -ENOMEM; return err;
acard = card->private_data; acard = card->private_data;
card->private_free = snd_sb8_free; card->private_free = snd_sb8_free;
......
...@@ -489,9 +489,9 @@ static int __devinit snd_sc6000_probe(struct device *devptr, unsigned int dev) ...@@ -489,9 +489,9 @@ static int __devinit snd_sc6000_probe(struct device *devptr, unsigned int dev)
char __iomem *vmss_port; char __iomem *vmss_port;
card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0); err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card);
if (!card) if (err < 0)
return -ENOMEM; return err;
if (xirq == SNDRV_AUTO_IRQ) { if (xirq == SNDRV_AUTO_IRQ) {
xirq = snd_legacy_find_free_irq(possible_irqs); xirq = snd_legacy_find_free_irq(possible_irqs);
......
...@@ -243,9 +243,9 @@ static int __devinit snd_sgalaxy_probe(struct device *devptr, unsigned int dev) ...@@ -243,9 +243,9 @@ static int __devinit snd_sgalaxy_probe(struct device *devptr, unsigned int dev)
struct snd_card *card; struct snd_card *card;
struct snd_wss *chip; struct snd_wss *chip;
card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0); err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card);
if (card == NULL) if (err < 0)
return -ENOMEM; return err;
xirq = irq[dev]; xirq = irq[dev];
if (xirq == SNDRV_AUTO_IRQ) { if (xirq == SNDRV_AUTO_IRQ) {
......
...@@ -1357,10 +1357,10 @@ static int __devinit snd_sscape_probe(struct device *pdev, unsigned int dev) ...@@ -1357,10 +1357,10 @@ static int __devinit snd_sscape_probe(struct device *pdev, unsigned int dev)
struct soundscape *sscape; struct soundscape *sscape;
int ret; int ret;
card = snd_card_new(index[dev], id[dev], THIS_MODULE, ret = snd_card_create(index[dev], id[dev], THIS_MODULE,
sizeof(struct soundscape)); sizeof(struct soundscape), &card);
if (!card) if (ret < 0)
return -ENOMEM; return ret;
sscape = get_card_soundscape(card); sscape = get_card_soundscape(card);
sscape->type = SSCAPE; sscape->type = SSCAPE;
...@@ -1462,10 +1462,10 @@ static int __devinit sscape_pnp_detect(struct pnp_card_link *pcard, ...@@ -1462,10 +1462,10 @@ static int __devinit sscape_pnp_detect(struct pnp_card_link *pcard,
* Create a new ALSA sound card entry, in anticipation * Create a new ALSA sound card entry, in anticipation
* of detecting our hardware ... * of detecting our hardware ...
*/ */
card = snd_card_new(index[idx], id[idx], THIS_MODULE, ret = snd_card_create(index[idx], id[idx], THIS_MODULE,
sizeof(struct soundscape)); sizeof(struct soundscape), &card);
if (!card) if (ret < 0)
return -ENOMEM; return ret;
sscape = get_card_soundscape(card); sscape = get_card_soundscape(card);
......
...@@ -342,10 +342,11 @@ static struct snd_card *snd_wavefront_card_new(int dev) ...@@ -342,10 +342,11 @@ static struct snd_card *snd_wavefront_card_new(int dev)
{ {
struct snd_card *card; struct snd_card *card;
snd_wavefront_card_t *acard; snd_wavefront_card_t *acard;
int err;
card = snd_card_new (index[dev], id[dev], THIS_MODULE, err = snd_card_create(index[dev], id[dev], THIS_MODULE,
sizeof(snd_wavefront_card_t)); sizeof(snd_wavefront_card_t), &card);
if (card == NULL) if (err < 0)
return NULL; return NULL;
acard = card->private_data; acard = card->private_data;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment