mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-15 00:34:10 +08:00
ALSA: isa: Convert to snd_card_new() with a device pointer
Also remove superfluous snd_card_set_dev() calls. Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
5872f3f621
commit
4323cc4d5b
@ -144,8 +144,9 @@ static int snd_card_ad1816a_probe(int dev, struct pnp_card_link *pcard,
|
|||||||
struct snd_opl3 *opl3;
|
struct snd_opl3 *opl3;
|
||||||
struct snd_timer *timer;
|
struct snd_timer *timer;
|
||||||
|
|
||||||
error = snd_card_create(index[dev], id[dev], THIS_MODULE,
|
error = snd_card_new(&pcard->card->dev,
|
||||||
sizeof(struct snd_ad1816a), &card);
|
index[dev], id[dev], THIS_MODULE,
|
||||||
|
sizeof(struct snd_ad1816a), &card);
|
||||||
if (error < 0)
|
if (error < 0)
|
||||||
return error;
|
return error;
|
||||||
chip = card->private_data;
|
chip = card->private_data;
|
||||||
@ -154,7 +155,6 @@ static int snd_card_ad1816a_probe(int dev, struct pnp_card_link *pcard,
|
|||||||
snd_card_free(card);
|
snd_card_free(card);
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
snd_card_set_dev(card, &pcard->card->dev);
|
|
||||||
|
|
||||||
if ((error = snd_ad1816a_create(card, port[dev],
|
if ((error = snd_ad1816a_create(card, port[dev],
|
||||||
irq[dev],
|
irq[dev],
|
||||||
|
@ -91,7 +91,7 @@ static int snd_ad1848_probe(struct device *dev, unsigned int n)
|
|||||||
struct snd_pcm *pcm;
|
struct snd_pcm *pcm;
|
||||||
int error;
|
int error;
|
||||||
|
|
||||||
error = snd_card_create(index[n], id[n], THIS_MODULE, 0, &card);
|
error = snd_card_new(dev, index[n], id[n], THIS_MODULE, 0, &card);
|
||||||
if (error < 0)
|
if (error < 0)
|
||||||
return error;
|
return error;
|
||||||
|
|
||||||
@ -119,8 +119,6 @@ static int snd_ad1848_probe(struct device *dev, unsigned int n)
|
|||||||
if (thinkpad[n])
|
if (thinkpad[n])
|
||||||
strcat(card->longname, " [Thinkpad]");
|
strcat(card->longname, " [Thinkpad]");
|
||||||
|
|
||||||
snd_card_set_dev(card, dev);
|
|
||||||
|
|
||||||
error = snd_card_register(card);
|
error = snd_card_register(card);
|
||||||
if (error < 0)
|
if (error < 0)
|
||||||
goto out;
|
goto out;
|
||||||
|
@ -53,7 +53,7 @@ static int snd_adlib_probe(struct device *dev, unsigned int n)
|
|||||||
struct snd_opl3 *opl3;
|
struct snd_opl3 *opl3;
|
||||||
int error;
|
int error;
|
||||||
|
|
||||||
error = snd_card_create(index[n], id[n], THIS_MODULE, 0, &card);
|
error = snd_card_new(dev, index[n], id[n], THIS_MODULE, 0, &card);
|
||||||
if (error < 0) {
|
if (error < 0) {
|
||||||
dev_err(dev, "could not create card\n");
|
dev_err(dev, "could not create card\n");
|
||||||
return error;
|
return error;
|
||||||
@ -83,8 +83,6 @@ static int snd_adlib_probe(struct device *dev, unsigned int n)
|
|||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
snd_card_set_dev(card, dev);
|
|
||||||
|
|
||||||
error = snd_card_register(card);
|
error = snd_card_register(card);
|
||||||
if (error < 0) {
|
if (error < 0) {
|
||||||
dev_err(dev, "could not register card\n");
|
dev_err(dev, "could not register card\n");
|
||||||
|
@ -193,8 +193,9 @@ static int snd_card_als100_probe(int dev,
|
|||||||
struct snd_card_als100 *acard;
|
struct snd_card_als100 *acard;
|
||||||
struct snd_opl3 *opl3;
|
struct snd_opl3 *opl3;
|
||||||
|
|
||||||
error = snd_card_create(index[dev], id[dev], THIS_MODULE,
|
error = snd_card_new(&pcard->card->dev,
|
||||||
sizeof(struct snd_card_als100), &card);
|
index[dev], id[dev], THIS_MODULE,
|
||||||
|
sizeof(struct snd_card_als100), &card);
|
||||||
if (error < 0)
|
if (error < 0)
|
||||||
return error;
|
return error;
|
||||||
acard = card->private_data;
|
acard = card->private_data;
|
||||||
@ -203,7 +204,6 @@ static int snd_card_als100_probe(int dev,
|
|||||||
snd_card_free(card);
|
snd_card_free(card);
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
snd_card_set_dev(card, &pcard->card->dev);
|
|
||||||
|
|
||||||
if (pid->driver_data == SB_HW_DT019X)
|
if (pid->driver_data == SB_HW_DT019X)
|
||||||
dma16[dev] = -1;
|
dma16[dev] = -1;
|
||||||
|
@ -184,8 +184,9 @@ static int snd_card_azt2320_probe(int dev,
|
|||||||
struct snd_wss *chip;
|
struct snd_wss *chip;
|
||||||
struct snd_opl3 *opl3;
|
struct snd_opl3 *opl3;
|
||||||
|
|
||||||
error = snd_card_create(index[dev], id[dev], THIS_MODULE,
|
error = snd_card_new(&pcard->card->dev,
|
||||||
sizeof(struct snd_card_azt2320), &card);
|
index[dev], id[dev], THIS_MODULE,
|
||||||
|
sizeof(struct snd_card_azt2320), &card);
|
||||||
if (error < 0)
|
if (error < 0)
|
||||||
return error;
|
return error;
|
||||||
acard = card->private_data;
|
acard = card->private_data;
|
||||||
@ -194,7 +195,6 @@ static int snd_card_azt2320_probe(int dev,
|
|||||||
snd_card_free(card);
|
snd_card_free(card);
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
snd_card_set_dev(card, &pcard->card->dev);
|
|
||||||
|
|
||||||
if ((error = snd_card_azt2320_enable_wss(port[dev]))) {
|
if ((error = snd_card_azt2320_enable_wss(port[dev]))) {
|
||||||
snd_card_free(card);
|
snd_card_free(card);
|
||||||
|
@ -293,15 +293,14 @@ static int snd_cmi8328_probe(struct device *pdev, unsigned int ndev)
|
|||||||
}
|
}
|
||||||
outb(val, port);
|
outb(val, port);
|
||||||
|
|
||||||
err = snd_card_create(index[ndev], id[ndev], THIS_MODULE,
|
err = snd_card_new(pdev, index[ndev], id[ndev], THIS_MODULE,
|
||||||
sizeof(struct snd_cmi8328), &card);
|
sizeof(struct snd_cmi8328), &card);
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
return err;
|
return err;
|
||||||
cmi = card->private_data;
|
cmi = card->private_data;
|
||||||
cmi->card = card;
|
cmi->card = card;
|
||||||
cmi->port = port;
|
cmi->port = port;
|
||||||
cmi->wss_cfg = val;
|
cmi->wss_cfg = val;
|
||||||
snd_card_set_dev(card, pdev);
|
|
||||||
|
|
||||||
err = snd_wss_create(card, port + 4, -1, irq[ndev], dma1[ndev],
|
err = snd_wss_create(card, port + 4, -1, irq[ndev], dma1[ndev],
|
||||||
dma2[ndev], WSS_HW_DETECT, 0, &cmi->wss);
|
dma2[ndev], WSS_HW_DETECT, 0, &cmi->wss);
|
||||||
|
@ -514,14 +514,15 @@ static int snd_cmi8330_resume(struct snd_card *card)
|
|||||||
|
|
||||||
#define PFX "cmi8330: "
|
#define PFX "cmi8330: "
|
||||||
|
|
||||||
static int snd_cmi8330_card_new(int dev, struct snd_card **cardp)
|
static int snd_cmi8330_card_new(struct device *pdev, int dev,
|
||||||
|
struct snd_card **cardp)
|
||||||
{
|
{
|
||||||
struct snd_card *card;
|
struct snd_card *card;
|
||||||
struct snd_cmi8330 *acard;
|
struct snd_cmi8330 *acard;
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
err = snd_card_create(index[dev], id[dev], THIS_MODULE,
|
err = snd_card_new(pdev, index[dev], id[dev], THIS_MODULE,
|
||||||
sizeof(struct snd_cmi8330), &card);
|
sizeof(struct snd_cmi8330), &card);
|
||||||
if (err < 0) {
|
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 err;
|
return err;
|
||||||
@ -635,10 +636,9 @@ static int snd_cmi8330_isa_probe(struct device *pdev,
|
|||||||
struct snd_card *card;
|
struct snd_card *card;
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
err = snd_cmi8330_card_new(dev, &card);
|
err = snd_cmi8330_card_new(pdev, dev, &card);
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
return err;
|
return err;
|
||||||
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);
|
||||||
return err;
|
return err;
|
||||||
@ -698,7 +698,7 @@ static int snd_cmi8330_pnp_detect(struct pnp_card_link *pcard,
|
|||||||
if (dev >= SNDRV_CARDS)
|
if (dev >= SNDRV_CARDS)
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
|
|
||||||
res = snd_cmi8330_card_new(dev, &card);
|
res = snd_cmi8330_card_new(&pcard->card->dev, dev, &card);
|
||||||
if (res < 0)
|
if (res < 0)
|
||||||
return res;
|
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) {
|
||||||
@ -706,7 +706,6 @@ static int snd_cmi8330_pnp_detect(struct pnp_card_link *pcard,
|
|||||||
snd_card_free(card);
|
snd_card_free(card);
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
snd_card_set_dev(card, &pcard->card->dev);
|
|
||||||
if ((res = snd_cmi8330_probe(card, dev)) < 0) {
|
if ((res = snd_cmi8330_probe(card, dev)) < 0) {
|
||||||
snd_card_free(card);
|
snd_card_free(card);
|
||||||
return res;
|
return res;
|
||||||
|
@ -95,7 +95,7 @@ static int snd_cs4231_probe(struct device *dev, unsigned int n)
|
|||||||
struct snd_pcm *pcm;
|
struct snd_pcm *pcm;
|
||||||
int error;
|
int error;
|
||||||
|
|
||||||
error = snd_card_create(index[n], id[n], THIS_MODULE, 0, &card);
|
error = snd_card_new(dev, index[n], id[n], THIS_MODULE, 0, &card);
|
||||||
if (error < 0)
|
if (error < 0)
|
||||||
return error;
|
return error;
|
||||||
|
|
||||||
@ -135,8 +135,6 @@ static int snd_cs4231_probe(struct device *dev, unsigned int n)
|
|||||||
dev_warn(dev, "MPU401 not detected\n");
|
dev_warn(dev, "MPU401 not detected\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
snd_card_set_dev(card, dev);
|
|
||||||
|
|
||||||
error = snd_card_register(card);
|
error = snd_card_register(card);
|
||||||
if (error < 0)
|
if (error < 0)
|
||||||
goto out;
|
goto out;
|
||||||
|
@ -364,13 +364,14 @@ static void snd_card_cs4236_free(struct snd_card *card)
|
|||||||
release_and_free_resource(acard->res_sb_port);
|
release_and_free_resource(acard->res_sb_port);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int snd_cs423x_card_new(int dev, struct snd_card **cardp)
|
static int snd_cs423x_card_new(struct device *pdev, int dev,
|
||||||
|
struct snd_card **cardp)
|
||||||
{
|
{
|
||||||
struct snd_card *card;
|
struct snd_card *card;
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
err = snd_card_create(index[dev], id[dev], THIS_MODULE,
|
err = snd_card_new(pdev, index[dev], id[dev], THIS_MODULE,
|
||||||
sizeof(struct snd_card_cs4236), &card);
|
sizeof(struct snd_card_cs4236), &card);
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
return err;
|
return err;
|
||||||
card->private_free = snd_card_cs4236_free;
|
card->private_free = snd_card_cs4236_free;
|
||||||
@ -487,10 +488,9 @@ static int snd_cs423x_isa_probe(struct device *pdev,
|
|||||||
struct snd_card *card;
|
struct snd_card *card;
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
err = snd_cs423x_card_new(dev, &card);
|
err = snd_cs423x_card_new(pdev, dev, &card);
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
return err;
|
return err;
|
||||||
snd_card_set_dev(card, pdev);
|
|
||||||
if ((err = snd_cs423x_probe(card, dev)) < 0) {
|
if ((err = snd_cs423x_probe(card, dev)) < 0) {
|
||||||
snd_card_free(card);
|
snd_card_free(card);
|
||||||
return err;
|
return err;
|
||||||
@ -577,7 +577,7 @@ static int snd_cs423x_pnpbios_detect(struct pnp_dev *pdev,
|
|||||||
if (!strcmp(cdev->id[0].id, cid))
|
if (!strcmp(cdev->id[0].id, cid))
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
err = snd_cs423x_card_new(dev, &card);
|
err = snd_cs423x_card_new(&pdev->dev, dev, &card);
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
return err;
|
return err;
|
||||||
err = snd_card_cs423x_pnp(dev, card->private_data, pdev, cdev);
|
err = snd_card_cs423x_pnp(dev, card->private_data, pdev, cdev);
|
||||||
@ -586,7 +586,6 @@ static int snd_cs423x_pnpbios_detect(struct pnp_dev *pdev,
|
|||||||
snd_card_free(card);
|
snd_card_free(card);
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
snd_card_set_dev(card, &pdev->dev);
|
|
||||||
if ((err = snd_cs423x_probe(card, dev)) < 0) {
|
if ((err = snd_cs423x_probe(card, dev)) < 0) {
|
||||||
snd_card_free(card);
|
snd_card_free(card);
|
||||||
return err;
|
return err;
|
||||||
@ -638,7 +637,7 @@ static int snd_cs423x_pnpc_detect(struct pnp_card_link *pcard,
|
|||||||
if (dev >= SNDRV_CARDS)
|
if (dev >= SNDRV_CARDS)
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
|
|
||||||
res = snd_cs423x_card_new(dev, &card);
|
res = snd_cs423x_card_new(&pcard->card->dev, dev, &card);
|
||||||
if (res < 0)
|
if (res < 0)
|
||||||
return res;
|
return res;
|
||||||
if ((res = snd_card_cs423x_pnpc(dev, card->private_data, pcard, pid)) < 0) {
|
if ((res = snd_card_cs423x_pnpc(dev, card->private_data, pcard, pid)) < 0) {
|
||||||
@ -647,7 +646,6 @@ static int snd_cs423x_pnpc_detect(struct pnp_card_link *pcard,
|
|||||||
snd_card_free(card);
|
snd_card_free(card);
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
snd_card_set_dev(card, &pcard->card->dev);
|
|
||||||
if ((res = snd_cs423x_probe(card, dev)) < 0) {
|
if ((res = snd_cs423x_probe(card, dev)) < 0) {
|
||||||
snd_card_free(card);
|
snd_card_free(card);
|
||||||
return res;
|
return res;
|
||||||
|
@ -187,8 +187,8 @@ static int snd_es1688_isa_probe(struct device *dev, unsigned int n)
|
|||||||
struct snd_card *card;
|
struct snd_card *card;
|
||||||
int error;
|
int error;
|
||||||
|
|
||||||
error = snd_card_create(index[n], id[n], THIS_MODULE,
|
error = snd_card_new(dev, index[n], id[n], THIS_MODULE,
|
||||||
sizeof(struct snd_es1688), &card);
|
sizeof(struct snd_es1688), &card);
|
||||||
if (error < 0)
|
if (error < 0)
|
||||||
return error;
|
return error;
|
||||||
|
|
||||||
@ -196,8 +196,6 @@ static int snd_es1688_isa_probe(struct device *dev, unsigned int n)
|
|||||||
if (error < 0)
|
if (error < 0)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
snd_card_set_dev(card, dev);
|
|
||||||
|
|
||||||
error = snd_es1688_probe(card, n);
|
error = snd_es1688_probe(card, n);
|
||||||
if (error < 0)
|
if (error < 0)
|
||||||
goto out;
|
goto out;
|
||||||
@ -274,8 +272,9 @@ static int snd_es968_pnp_detect(struct pnp_card_link *pcard,
|
|||||||
if (dev == SNDRV_CARDS)
|
if (dev == SNDRV_CARDS)
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
|
|
||||||
error = snd_card_create(index[dev], id[dev], THIS_MODULE,
|
error = snd_card_new(&pcard->card->dev,
|
||||||
sizeof(struct snd_es1688), &card);
|
index[dev], id[dev], THIS_MODULE,
|
||||||
|
sizeof(struct snd_es1688), &card);
|
||||||
if (error < 0)
|
if (error < 0)
|
||||||
return error;
|
return error;
|
||||||
chip = card->private_data;
|
chip = card->private_data;
|
||||||
@ -285,7 +284,6 @@ static int snd_es968_pnp_detect(struct pnp_card_link *pcard,
|
|||||||
snd_card_free(card);
|
snd_card_free(card);
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
snd_card_set_dev(card, &pcard->card->dev);
|
|
||||||
error = snd_es1688_probe(card, dev);
|
error = snd_es1688_probe(card, dev);
|
||||||
if (error < 0)
|
if (error < 0)
|
||||||
return error;
|
return error;
|
||||||
|
@ -2105,10 +2105,11 @@ static int snd_audiodrive_pnpc(int dev, struct snd_es18xx *chip,
|
|||||||
#define is_isapnp_selected(dev) 0
|
#define is_isapnp_selected(dev) 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static int snd_es18xx_card_new(int dev, struct snd_card **cardp)
|
static int snd_es18xx_card_new(struct device *pdev, int dev,
|
||||||
|
struct snd_card **cardp)
|
||||||
{
|
{
|
||||||
return snd_card_create(index[dev], id[dev], THIS_MODULE,
|
return snd_card_new(pdev, index[dev], id[dev], THIS_MODULE,
|
||||||
sizeof(struct snd_es18xx), cardp);
|
sizeof(struct snd_es18xx), cardp);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int snd_audiodrive_probe(struct snd_card *card, int dev)
|
static int snd_audiodrive_probe(struct snd_card *card, int dev)
|
||||||
@ -2179,10 +2180,9 @@ static int snd_es18xx_isa_probe1(int dev, struct device *devptr)
|
|||||||
struct snd_card *card;
|
struct snd_card *card;
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
err = snd_es18xx_card_new(dev, &card);
|
err = snd_es18xx_card_new(devptr, dev, &card);
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
return err;
|
return err;
|
||||||
snd_card_set_dev(card, devptr);
|
|
||||||
if ((err = snd_audiodrive_probe(card, dev)) < 0) {
|
if ((err = snd_audiodrive_probe(card, dev)) < 0) {
|
||||||
snd_card_free(card);
|
snd_card_free(card);
|
||||||
return err;
|
return err;
|
||||||
@ -2284,14 +2284,13 @@ static int snd_audiodrive_pnp_detect(struct pnp_dev *pdev,
|
|||||||
if (dev >= SNDRV_CARDS)
|
if (dev >= SNDRV_CARDS)
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
|
|
||||||
err = snd_es18xx_card_new(dev, &card);
|
err = snd_es18xx_card_new(&pdev->dev, dev, &card);
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
return err;
|
return err;
|
||||||
if ((err = snd_audiodrive_pnp(dev, card->private_data, pdev)) < 0) {
|
if ((err = snd_audiodrive_pnp(dev, card->private_data, pdev)) < 0) {
|
||||||
snd_card_free(card);
|
snd_card_free(card);
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
snd_card_set_dev(card, &pdev->dev);
|
|
||||||
if ((err = snd_audiodrive_probe(card, dev)) < 0) {
|
if ((err = snd_audiodrive_probe(card, dev)) < 0) {
|
||||||
snd_card_free(card);
|
snd_card_free(card);
|
||||||
return err;
|
return err;
|
||||||
@ -2342,7 +2341,7 @@ static int snd_audiodrive_pnpc_detect(struct pnp_card_link *pcard,
|
|||||||
if (dev >= SNDRV_CARDS)
|
if (dev >= SNDRV_CARDS)
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
|
|
||||||
res = snd_es18xx_card_new(dev, &card);
|
res = snd_es18xx_card_new(&pcard->card->dev, dev, &card);
|
||||||
if (res < 0)
|
if (res < 0)
|
||||||
return res;
|
return res;
|
||||||
|
|
||||||
@ -2350,7 +2349,6 @@ static int snd_audiodrive_pnpc_detect(struct pnp_card_link *pcard,
|
|||||||
snd_card_free(card);
|
snd_card_free(card);
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
snd_card_set_dev(card, &pcard->card->dev);
|
|
||||||
if ((res = snd_audiodrive_probe(card, dev)) < 0) {
|
if ((res = snd_audiodrive_probe(card, dev)) < 0) {
|
||||||
snd_card_free(card);
|
snd_card_free(card);
|
||||||
return res;
|
return res;
|
||||||
|
@ -506,13 +506,11 @@ static int snd_galaxy_probe(struct device *dev, unsigned int n)
|
|||||||
u8 type;
|
u8 type;
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
err = snd_card_create(index[n], id[n], THIS_MODULE, sizeof *galaxy,
|
err = snd_card_new(dev, index[n], id[n], THIS_MODULE,
|
||||||
&card);
|
sizeof(*galaxy), &card);
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
return err;
|
return err;
|
||||||
|
|
||||||
snd_card_set_dev(card, dev);
|
|
||||||
|
|
||||||
card->private_free = snd_galaxy_free;
|
card->private_free = snd_galaxy_free;
|
||||||
galaxy = card->private_data;
|
galaxy = card->private_data;
|
||||||
|
|
||||||
|
@ -149,7 +149,7 @@ static int snd_gusclassic_probe(struct device *dev, unsigned int n)
|
|||||||
struct snd_gus_card *gus;
|
struct snd_gus_card *gus;
|
||||||
int error;
|
int error;
|
||||||
|
|
||||||
error = snd_card_create(index[n], id[n], THIS_MODULE, 0, &card);
|
error = snd_card_new(dev, index[n], id[n], THIS_MODULE, 0, &card);
|
||||||
if (error < 0)
|
if (error < 0)
|
||||||
return error;
|
return error;
|
||||||
|
|
||||||
@ -199,8 +199,6 @@ static int snd_gusclassic_probe(struct device *dev, unsigned int n)
|
|||||||
sprintf(card->longname + strlen(card->longname),
|
sprintf(card->longname + strlen(card->longname),
|
||||||
"&%d", gus->gf1.dma2);
|
"&%d", gus->gf1.dma2);
|
||||||
|
|
||||||
snd_card_set_dev(card, dev);
|
|
||||||
|
|
||||||
error = snd_card_register(card);
|
error = snd_card_register(card);
|
||||||
if (error < 0)
|
if (error < 0)
|
||||||
goto out;
|
goto out;
|
||||||
|
@ -242,8 +242,8 @@ static int snd_gusextreme_probe(struct device *dev, unsigned int n)
|
|||||||
struct snd_opl3 *opl3;
|
struct snd_opl3 *opl3;
|
||||||
int error;
|
int error;
|
||||||
|
|
||||||
error = snd_card_create(index[n], id[n], THIS_MODULE,
|
error = snd_card_new(dev, index[n], id[n], THIS_MODULE,
|
||||||
sizeof(struct snd_es1688), &card);
|
sizeof(struct snd_es1688), &card);
|
||||||
if (error < 0)
|
if (error < 0)
|
||||||
return error;
|
return error;
|
||||||
|
|
||||||
@ -328,8 +328,6 @@ static int snd_gusextreme_probe(struct device *dev, unsigned int n)
|
|||||||
"irq %i&%i, dma %i&%i", es1688->port,
|
"irq %i&%i, dma %i&%i", es1688->port,
|
||||||
gus->gf1.irq, es1688->irq, gus->gf1.dma1, es1688->dma8);
|
gus->gf1.irq, es1688->irq, gus->gf1.dma1, es1688->dma8);
|
||||||
|
|
||||||
snd_card_set_dev(card, dev);
|
|
||||||
|
|
||||||
error = snd_card_register(card);
|
error = snd_card_register(card);
|
||||||
if (error < 0)
|
if (error < 0)
|
||||||
goto out;
|
goto out;
|
||||||
|
@ -214,8 +214,8 @@ static int 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;
|
||||||
|
|
||||||
err = snd_card_create(index[dev], id[dev], THIS_MODULE,
|
err = snd_card_new(pdev, index[dev], id[dev], THIS_MODULE,
|
||||||
sizeof(struct snd_gusmax), &card);
|
sizeof(struct snd_gusmax), &card);
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
return err;
|
return err;
|
||||||
card->private_free = snd_gusmax_free;
|
card->private_free = snd_gusmax_free;
|
||||||
@ -337,8 +337,6 @@ static int snd_gusmax_probe(struct device *pdev, unsigned int dev)
|
|||||||
if (xdma2 >= 0)
|
if (xdma2 >= 0)
|
||||||
sprintf(card->longname + strlen(card->longname), "&%i", xdma2);
|
sprintf(card->longname + strlen(card->longname), "&%i", xdma2);
|
||||||
|
|
||||||
snd_card_set_dev(card, pdev);
|
|
||||||
|
|
||||||
err = snd_card_register(card);
|
err = snd_card_register(card);
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
goto _err;
|
goto _err;
|
||||||
|
@ -625,14 +625,15 @@ static void snd_interwave_free(struct snd_card *card)
|
|||||||
free_irq(iwcard->irq, (void *)iwcard);
|
free_irq(iwcard->irq, (void *)iwcard);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int snd_interwave_card_new(int dev, struct snd_card **cardp)
|
static int snd_interwave_card_new(struct device *pdev, int dev,
|
||||||
|
struct snd_card **cardp)
|
||||||
{
|
{
|
||||||
struct snd_card *card;
|
struct snd_card *card;
|
||||||
struct snd_interwave *iwcard;
|
struct snd_interwave *iwcard;
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
err = snd_card_create(index[dev], id[dev], THIS_MODULE,
|
err = snd_card_new(pdev, index[dev], id[dev], THIS_MODULE,
|
||||||
sizeof(struct snd_interwave), &card);
|
sizeof(struct snd_interwave), &card);
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
return err;
|
return err;
|
||||||
iwcard = card->private_data;
|
iwcard = card->private_data;
|
||||||
@ -779,11 +780,10 @@ static int snd_interwave_isa_probe1(int dev, struct device *devptr)
|
|||||||
struct snd_card *card;
|
struct snd_card *card;
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
err = snd_interwave_card_new(dev, &card);
|
err = snd_interwave_card_new(devptr, dev, &card);
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
return err;
|
return err;
|
||||||
|
|
||||||
snd_card_set_dev(card, devptr);
|
|
||||||
if ((err = snd_interwave_probe(card, dev)) < 0) {
|
if ((err = snd_interwave_probe(card, dev)) < 0) {
|
||||||
snd_card_free(card);
|
snd_card_free(card);
|
||||||
return err;
|
return err;
|
||||||
@ -876,7 +876,7 @@ static int snd_interwave_pnp_detect(struct pnp_card_link *pcard,
|
|||||||
if (dev >= SNDRV_CARDS)
|
if (dev >= SNDRV_CARDS)
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
|
|
||||||
res = snd_interwave_card_new(dev, &card);
|
res = snd_interwave_card_new(&pcard->card->dev, dev, &card);
|
||||||
if (res < 0)
|
if (res < 0)
|
||||||
return res;
|
return res;
|
||||||
|
|
||||||
@ -884,7 +884,6 @@ static int snd_interwave_pnp_detect(struct pnp_card_link *pcard,
|
|||||||
snd_card_free(card);
|
snd_card_free(card);
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
snd_card_set_dev(card, &pcard->card->dev);
|
|
||||||
if ((res = snd_interwave_probe(card, dev)) < 0) {
|
if ((res = snd_interwave_probe(card, dev)) < 0) {
|
||||||
snd_card_free(card);
|
snd_card_free(card);
|
||||||
return res;
|
return res;
|
||||||
|
@ -905,12 +905,11 @@ static int snd_msnd_isa_probe(struct device *pdev, unsigned int idx)
|
|||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
|
|
||||||
err = snd_card_create(index[idx], id[idx], THIS_MODULE,
|
err = snd_card_new(pdev, index[idx], id[idx], THIS_MODULE,
|
||||||
sizeof(struct snd_msnd), &card);
|
sizeof(struct snd_msnd), &card);
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
return err;
|
return err;
|
||||||
|
|
||||||
snd_card_set_dev(card, pdev);
|
|
||||||
chip = card->private_data;
|
chip = card->private_data;
|
||||||
chip->card = card;
|
chip->card = card;
|
||||||
|
|
||||||
@ -1122,14 +1121,14 @@ static int snd_msnd_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 ...
|
||||||
*/
|
*/
|
||||||
ret = snd_card_create(index[idx], id[idx], THIS_MODULE,
|
ret = snd_card_new(&pcard->card->dev,
|
||||||
sizeof(struct snd_msnd), &card);
|
index[idx], id[idx], THIS_MODULE,
|
||||||
|
sizeof(struct snd_msnd), &card);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
chip = card->private_data;
|
chip = card->private_data;
|
||||||
chip->card = card;
|
chip->card = card;
|
||||||
snd_card_set_dev(card, &pcard->card->dev);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Read the correct parameters off the ISA PnP bus ...
|
* Read the correct parameters off the ISA PnP bus ...
|
||||||
|
@ -627,14 +627,15 @@ static void snd_opl3sa2_free(struct snd_card *card)
|
|||||||
release_and_free_resource(chip->res_port);
|
release_and_free_resource(chip->res_port);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int snd_opl3sa2_card_new(int dev, struct snd_card **cardp)
|
static int snd_opl3sa2_card_new(struct device *pdev, int dev,
|
||||||
|
struct snd_card **cardp)
|
||||||
{
|
{
|
||||||
struct snd_card *card;
|
struct snd_card *card;
|
||||||
struct snd_opl3sa2 *chip;
|
struct snd_opl3sa2 *chip;
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
err = snd_card_create(index[dev], id[dev], THIS_MODULE,
|
err = snd_card_new(pdev, index[dev], id[dev], THIS_MODULE,
|
||||||
sizeof(struct snd_opl3sa2), &card);
|
sizeof(struct snd_opl3sa2), &card);
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
return err;
|
return err;
|
||||||
strcpy(card->driver, "OPL3SA2");
|
strcpy(card->driver, "OPL3SA2");
|
||||||
@ -737,14 +738,13 @@ static int snd_opl3sa2_pnp_detect(struct pnp_dev *pdev,
|
|||||||
if (dev >= SNDRV_CARDS)
|
if (dev >= SNDRV_CARDS)
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
|
|
||||||
err = snd_opl3sa2_card_new(dev, &card);
|
err = snd_opl3sa2_card_new(&pdev->dev, dev, &card);
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
return err;
|
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;
|
||||||
}
|
}
|
||||||
snd_card_set_dev(card, &pdev->dev);
|
|
||||||
if ((err = snd_opl3sa2_probe(card, dev)) < 0) {
|
if ((err = snd_opl3sa2_probe(card, dev)) < 0) {
|
||||||
snd_card_free(card);
|
snd_card_free(card);
|
||||||
return err;
|
return err;
|
||||||
@ -802,14 +802,13 @@ static int snd_opl3sa2_pnp_cdetect(struct pnp_card_link *pcard,
|
|||||||
if (dev >= SNDRV_CARDS)
|
if (dev >= SNDRV_CARDS)
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
|
|
||||||
err = snd_opl3sa2_card_new(dev, &card);
|
err = snd_opl3sa2_card_new(&pdev->dev, dev, &card);
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
return err;
|
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;
|
||||||
}
|
}
|
||||||
snd_card_set_dev(card, &pdev->dev);
|
|
||||||
if ((err = snd_opl3sa2_probe(card, dev)) < 0) {
|
if ((err = snd_opl3sa2_probe(card, dev)) < 0) {
|
||||||
snd_card_free(card);
|
snd_card_free(card);
|
||||||
return err;
|
return err;
|
||||||
@ -883,10 +882,9 @@ static int snd_opl3sa2_isa_probe(struct device *pdev,
|
|||||||
struct snd_card *card;
|
struct snd_card *card;
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
err = snd_opl3sa2_card_new(dev, &card);
|
err = snd_opl3sa2_card_new(pdev, dev, &card);
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
return err;
|
return err;
|
||||||
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);
|
||||||
return err;
|
return err;
|
||||||
|
@ -1411,8 +1411,8 @@ static int snd_miro_isa_probe(struct device *devptr, unsigned int n)
|
|||||||
struct snd_miro *miro;
|
struct snd_miro *miro;
|
||||||
struct snd_card *card;
|
struct snd_card *card;
|
||||||
|
|
||||||
error = snd_card_create(index, id, THIS_MODULE,
|
error = snd_card_new(devptr, index, id, THIS_MODULE,
|
||||||
sizeof(struct snd_miro), &card);
|
sizeof(struct snd_miro), &card);
|
||||||
if (error < 0)
|
if (error < 0)
|
||||||
return error;
|
return error;
|
||||||
|
|
||||||
@ -1479,8 +1479,6 @@ static int snd_miro_isa_probe(struct device *devptr, unsigned int n)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
snd_card_set_dev(card, devptr);
|
|
||||||
|
|
||||||
error = snd_miro_probe(card);
|
error = snd_miro_probe(card);
|
||||||
if (error < 0) {
|
if (error < 0) {
|
||||||
snd_card_free(card);
|
snd_card_free(card);
|
||||||
@ -1584,8 +1582,8 @@ static int snd_miro_pnp_probe(struct pnp_card_link *pcard,
|
|||||||
return -EBUSY;
|
return -EBUSY;
|
||||||
if (!isapnp)
|
if (!isapnp)
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
err = snd_card_create(index, id, THIS_MODULE,
|
err = snd_card_new(&pcard->card->dev, index, id, THIS_MODULE,
|
||||||
sizeof(struct snd_miro), &card);
|
sizeof(struct snd_miro), &card);
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
return err;
|
return err;
|
||||||
|
|
||||||
@ -1612,7 +1610,6 @@ static int snd_miro_pnp_probe(struct pnp_card_link *pcard,
|
|||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
snd_card_set_dev(card, &pcard->card->dev);
|
|
||||||
err = snd_miro_probe(card);
|
err = snd_miro_probe(card);
|
||||||
if (err < 0) {
|
if (err < 0) {
|
||||||
snd_card_free(card);
|
snd_card_free(card);
|
||||||
|
@ -934,13 +934,13 @@ static int snd_opti9xx_probe(struct snd_card *card)
|
|||||||
return snd_card_register(card);
|
return snd_card_register(card);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int snd_opti9xx_card_new(struct snd_card **cardp)
|
static int snd_opti9xx_card_new(struct device *pdev, struct snd_card **cardp)
|
||||||
{
|
{
|
||||||
struct snd_card *card;
|
struct snd_card *card;
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
err = snd_card_create(index, id, THIS_MODULE,
|
err = snd_card_new(pdev, index, id, THIS_MODULE,
|
||||||
sizeof(struct snd_opti9xx), &card);
|
sizeof(struct snd_opti9xx), &card);
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
return err;
|
return err;
|
||||||
card->private_free = snd_card_opti9xx_free;
|
card->private_free = snd_card_opti9xx_free;
|
||||||
@ -1010,7 +1010,7 @@ static int snd_opti9xx_isa_probe(struct device *devptr,
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
error = snd_opti9xx_card_new(&card);
|
error = snd_opti9xx_card_new(devptr, &card);
|
||||||
if (error < 0)
|
if (error < 0)
|
||||||
return error;
|
return error;
|
||||||
|
|
||||||
@ -1018,7 +1018,6 @@ static int snd_opti9xx_isa_probe(struct device *devptr,
|
|||||||
snd_card_free(card);
|
snd_card_free(card);
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
snd_card_set_dev(card, devptr);
|
|
||||||
if ((error = snd_opti9xx_probe(card)) < 0) {
|
if ((error = snd_opti9xx_probe(card)) < 0) {
|
||||||
snd_card_free(card);
|
snd_card_free(card);
|
||||||
return error;
|
return error;
|
||||||
@ -1100,7 +1099,7 @@ static int snd_opti9xx_pnp_probe(struct pnp_card_link *pcard,
|
|||||||
return -EBUSY;
|
return -EBUSY;
|
||||||
if (! isapnp)
|
if (! isapnp)
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
error = snd_opti9xx_card_new(&card);
|
error = snd_opti9xx_card_new(&pcard->card->dev, &card);
|
||||||
if (error < 0)
|
if (error < 0)
|
||||||
return error;
|
return error;
|
||||||
chip = card->private_data;
|
chip = card->private_data;
|
||||||
@ -1131,7 +1130,6 @@ static int snd_opti9xx_pnp_probe(struct pnp_card_link *pcard,
|
|||||||
snd_card_free(card);
|
snd_card_free(card);
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
snd_card_set_dev(card, &pcard->card->dev);
|
|
||||||
if ((error = snd_opti9xx_probe(card)) < 0) {
|
if ((error = snd_opti9xx_probe(card)) < 0) {
|
||||||
snd_card_free(card);
|
snd_card_free(card);
|
||||||
return error;
|
return error;
|
||||||
|
@ -229,8 +229,8 @@ static int snd_jazz16_probe(struct device *devptr, unsigned int dev)
|
|||||||
static int possible_dmas16[] = {5, 7, -1};
|
static int possible_dmas16[] = {5, 7, -1};
|
||||||
int err, xirq, xdma8, xdma16, xmpu_port, xmpu_irq;
|
int err, xirq, xdma8, xdma16, xmpu_port, xmpu_irq;
|
||||||
|
|
||||||
err = snd_card_create(index[dev], id[dev], THIS_MODULE,
|
err = snd_card_new(devptr, index[dev], id[dev], THIS_MODULE,
|
||||||
sizeof(struct snd_card_jazz16), &card);
|
sizeof(struct snd_card_jazz16), &card);
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
return err;
|
return err;
|
||||||
|
|
||||||
@ -327,8 +327,6 @@ static int snd_jazz16_probe(struct device *devptr, unsigned int dev)
|
|||||||
mpu_port[dev]);
|
mpu_port[dev]);
|
||||||
}
|
}
|
||||||
|
|
||||||
snd_card_set_dev(card, devptr);
|
|
||||||
|
|
||||||
err = snd_card_register(card);
|
err = snd_card_register(card);
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
goto err_free;
|
goto err_free;
|
||||||
|
@ -323,13 +323,14 @@ static void snd_sb16_free(struct snd_card *card)
|
|||||||
#define is_isapnp_selected(dev) 0
|
#define is_isapnp_selected(dev) 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static int snd_sb16_card_new(int dev, struct snd_card **cardp)
|
static int snd_sb16_card_new(struct device *devptr, int dev,
|
||||||
|
struct snd_card **cardp)
|
||||||
{
|
{
|
||||||
struct snd_card *card;
|
struct snd_card *card;
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
err = snd_card_create(index[dev], id[dev], THIS_MODULE,
|
err = snd_card_new(devptr, index[dev], id[dev], THIS_MODULE,
|
||||||
sizeof(struct snd_card_sb16), &card);
|
sizeof(struct snd_card_sb16), &card);
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
return err;
|
return err;
|
||||||
card->private_free = snd_sb16_free;
|
card->private_free = snd_sb16_free;
|
||||||
@ -493,7 +494,7 @@ static int snd_sb16_isa_probe1(int dev, struct device *pdev)
|
|||||||
struct snd_card *card;
|
struct snd_card *card;
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
err = snd_sb16_card_new(dev, &card);
|
err = snd_sb16_card_new(pdev, dev, &card);
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
return err;
|
return err;
|
||||||
|
|
||||||
@ -507,7 +508,6 @@ static int snd_sb16_isa_probe1(int dev, struct device *pdev)
|
|||||||
awe_port[dev] = port[dev] + 0x400;
|
awe_port[dev] = port[dev] + 0x400;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
snd_card_set_dev(card, pdev);
|
|
||||||
if ((err = snd_sb16_probe(card, dev)) < 0) {
|
if ((err = snd_sb16_probe(card, dev)) < 0) {
|
||||||
snd_card_free(card);
|
snd_card_free(card);
|
||||||
return err;
|
return err;
|
||||||
@ -613,10 +613,9 @@ static int snd_sb16_pnp_detect(struct pnp_card_link *pcard,
|
|||||||
for ( ; dev < SNDRV_CARDS; dev++) {
|
for ( ; dev < SNDRV_CARDS; dev++) {
|
||||||
if (!enable[dev] || !isapnp[dev])
|
if (!enable[dev] || !isapnp[dev])
|
||||||
continue;
|
continue;
|
||||||
res = snd_sb16_card_new(dev, &card);
|
res = snd_sb16_card_new(&pcard->card->dev, dev, &card);
|
||||||
if (res < 0)
|
if (res < 0)
|
||||||
return res;
|
return res;
|
||||||
snd_card_set_dev(card, &pcard->card->dev);
|
|
||||||
if ((res = snd_card_sb16_pnp(dev, card->private_data, pcard, pid)) < 0 ||
|
if ((res = snd_card_sb16_pnp(dev, card->private_data, pcard, pid)) < 0 ||
|
||||||
(res = snd_sb16_probe(card, dev)) < 0) {
|
(res = snd_sb16_probe(card, dev)) < 0) {
|
||||||
snd_card_free(card);
|
snd_card_free(card);
|
||||||
|
@ -102,8 +102,8 @@ static int snd_sb8_probe(struct device *pdev, unsigned int dev)
|
|||||||
struct snd_opl3 *opl3;
|
struct snd_opl3 *opl3;
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
err = snd_card_create(index[dev], id[dev], THIS_MODULE,
|
err = snd_card_new(pdev, index[dev], id[dev], THIS_MODULE,
|
||||||
sizeof(struct snd_sb8), &card);
|
sizeof(struct snd_sb8), &card);
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
return err;
|
return err;
|
||||||
acard = card->private_data;
|
acard = card->private_data;
|
||||||
@ -192,8 +192,6 @@ static int snd_sb8_probe(struct device *pdev, unsigned int dev)
|
|||||||
chip->port,
|
chip->port,
|
||||||
irq[dev], dma8[dev]);
|
irq[dev], dma8[dev]);
|
||||||
|
|
||||||
snd_card_set_dev(card, pdev);
|
|
||||||
|
|
||||||
if ((err = snd_card_register(card)) < 0)
|
if ((err = snd_card_register(card)) < 0)
|
||||||
goto _err;
|
goto _err;
|
||||||
|
|
||||||
|
@ -559,8 +559,8 @@ static int snd_sc6000_probe(struct device *devptr, unsigned int dev)
|
|||||||
char __iomem *vmss_port;
|
char __iomem *vmss_port;
|
||||||
|
|
||||||
|
|
||||||
err = snd_card_create(index[dev], id[dev], THIS_MODULE, sizeof(vport),
|
err = snd_card_new(devptr, index[dev], id[dev], THIS_MODULE,
|
||||||
&card);
|
sizeof(vport), &card);
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
return err;
|
return err;
|
||||||
|
|
||||||
@ -668,8 +668,6 @@ static int snd_sc6000_probe(struct device *devptr, unsigned int dev)
|
|||||||
sprintf(card->longname, "Gallant SC-6000 at 0x%lx, irq %d, dma %d",
|
sprintf(card->longname, "Gallant SC-6000 at 0x%lx, irq %d, dma %d",
|
||||||
mss_port[dev], xirq, xdma);
|
mss_port[dev], xirq, xdma);
|
||||||
|
|
||||||
snd_card_set_dev(card, devptr);
|
|
||||||
|
|
||||||
err = snd_card_register(card);
|
err = snd_card_register(card);
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
goto err_unmap2;
|
goto err_unmap2;
|
||||||
|
@ -1169,8 +1169,8 @@ static int snd_sscape_probe(struct device *pdev, unsigned int dev)
|
|||||||
struct soundscape *sscape;
|
struct soundscape *sscape;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
ret = snd_card_create(index[dev], id[dev], THIS_MODULE,
|
ret = snd_card_new(pdev, index[dev], id[dev], THIS_MODULE,
|
||||||
sizeof(struct soundscape), &card);
|
sizeof(struct soundscape), &card);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
@ -1178,7 +1178,6 @@ static int snd_sscape_probe(struct device *pdev, unsigned int dev)
|
|||||||
sscape->type = SSCAPE;
|
sscape->type = SSCAPE;
|
||||||
|
|
||||||
dma[dev] &= 0x03;
|
dma[dev] &= 0x03;
|
||||||
snd_card_set_dev(card, pdev);
|
|
||||||
|
|
||||||
ret = create_sscape(dev, card);
|
ret = create_sscape(dev, card);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
@ -1259,8 +1258,9 @@ static int 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 ...
|
||||||
*/
|
*/
|
||||||
ret = snd_card_create(index[idx], id[idx], THIS_MODULE,
|
ret = snd_card_new(&pcard->card->dev,
|
||||||
sizeof(struct soundscape), &card);
|
index[idx], id[idx], THIS_MODULE,
|
||||||
|
sizeof(struct soundscape), &card);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
@ -1288,7 +1288,6 @@ static int sscape_pnp_detect(struct pnp_card_link *pcard,
|
|||||||
wss_port[idx] = pnp_port_start(dev, 1);
|
wss_port[idx] = pnp_port_start(dev, 1);
|
||||||
dma2[idx] = pnp_dma(dev, 1);
|
dma2[idx] = pnp_dma(dev, 1);
|
||||||
}
|
}
|
||||||
snd_card_set_dev(card, &pcard->card->dev);
|
|
||||||
|
|
||||||
ret = create_sscape(idx, card);
|
ret = create_sscape(idx, card);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
|
@ -334,14 +334,15 @@ snd_wavefront_free(struct snd_card *card)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static int snd_wavefront_card_new(int dev, struct snd_card **cardp)
|
static int snd_wavefront_card_new(struct device *pdev, int dev,
|
||||||
|
struct snd_card **cardp)
|
||||||
{
|
{
|
||||||
struct snd_card *card;
|
struct snd_card *card;
|
||||||
snd_wavefront_card_t *acard;
|
snd_wavefront_card_t *acard;
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
err = snd_card_create(index[dev], id[dev], THIS_MODULE,
|
err = snd_card_new(pdev, index[dev], id[dev], THIS_MODULE,
|
||||||
sizeof(snd_wavefront_card_t), &card);
|
sizeof(snd_wavefront_card_t), &card);
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
return err;
|
return err;
|
||||||
|
|
||||||
@ -564,10 +565,9 @@ static int snd_wavefront_isa_probe(struct device *pdev,
|
|||||||
struct snd_card *card;
|
struct snd_card *card;
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
err = snd_wavefront_card_new(dev, &card);
|
err = snd_wavefront_card_new(pdev, dev, &card);
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
return err;
|
return err;
|
||||||
snd_card_set_dev(card, pdev);
|
|
||||||
if ((err = snd_wavefront_probe(card, dev)) < 0) {
|
if ((err = snd_wavefront_probe(card, dev)) < 0) {
|
||||||
snd_card_free(card);
|
snd_card_free(card);
|
||||||
return err;
|
return err;
|
||||||
@ -612,7 +612,7 @@ static int snd_wavefront_pnp_detect(struct pnp_card_link *pcard,
|
|||||||
if (dev >= SNDRV_CARDS)
|
if (dev >= SNDRV_CARDS)
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
|
|
||||||
res = snd_wavefront_card_new(dev, &card);
|
res = snd_wavefront_card_new(&pcard->card->dev, dev, &card);
|
||||||
if (res < 0)
|
if (res < 0)
|
||||||
return res;
|
return res;
|
||||||
|
|
||||||
@ -623,7 +623,6 @@ static int snd_wavefront_pnp_detect(struct pnp_card_link *pcard,
|
|||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
snd_card_set_dev(card, &pcard->card->dev);
|
|
||||||
|
|
||||||
if ((res = snd_wavefront_probe(card, dev)) < 0)
|
if ((res = snd_wavefront_probe(card, dev)) < 0)
|
||||||
return res;
|
return res;
|
||||||
|
Loading…
Reference in New Issue
Block a user