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:
@@ -905,12 +905,11 @@ static int snd_msnd_isa_probe(struct device *pdev, unsigned int idx)
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
err = snd_card_create(index[idx], id[idx], THIS_MODULE,
|
||||
sizeof(struct snd_msnd), &card);
|
||||
err = snd_card_new(pdev, index[idx], id[idx], THIS_MODULE,
|
||||
sizeof(struct snd_msnd), &card);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
snd_card_set_dev(card, pdev);
|
||||
chip = card->private_data;
|
||||
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
|
||||
* of detecting our hardware ...
|
||||
*/
|
||||
ret = snd_card_create(index[idx], id[idx], THIS_MODULE,
|
||||
sizeof(struct snd_msnd), &card);
|
||||
ret = snd_card_new(&pcard->card->dev,
|
||||
index[idx], id[idx], THIS_MODULE,
|
||||
sizeof(struct snd_msnd), &card);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
chip = card->private_data;
|
||||
chip->card = card;
|
||||
snd_card_set_dev(card, &pcard->card->dev);
|
||||
|
||||
/*
|
||||
* Read the correct parameters off the ISA PnP bus ...
|
||||
|
Reference in New Issue
Block a user