Skip to content

Commit bee1bb1

Browse files
committed
ALSA: mips: 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>
1 parent 7d13211 commit bee1bb1

3 files changed

Lines changed: 4 additions & 6 deletions

File tree

‎sound/mips/au1x00.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -601,8 +601,8 @@ static int au1000_ac97_probe(struct platform_device *pdev)
601601
struct snd_ac97_bus *pbus;
602602
struct snd_ac97_template ac97;
603603

604-
err = snd_card_create(-1, "AC97", THIS_MODULE,
605-
sizeof(struct snd_au1000), &card);
604+
err = snd_card_new(&pdev->dev, -1, "AC97", THIS_MODULE,
605+
sizeof(struct snd_au1000), &card);
606606
if (err < 0)
607607
return err;
608608

‎sound/mips/hal2.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -880,7 +880,7 @@ static int hal2_probe(struct platform_device *pdev)
880880
struct snd_hal2 *chip;
881881
int err;
882882

883-
err = snd_card_create(index, id, THIS_MODULE, 0, &card);
883+
err = snd_card_new(&pdev->dev, index, id, THIS_MODULE, 0, &card);
884884
if (err < 0)
885885
return err;
886886

@@ -889,7 +889,6 @@ static int hal2_probe(struct platform_device *pdev)
889889
snd_card_free(card);
890890
return err;
891891
}
892-
snd_card_set_dev(card, &pdev->dev);
893892

894893
err = hal2_pcm_create(chip);
895894
if (err < 0) {

‎sound/mips/sgio2audio.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -920,7 +920,7 @@ static int snd_sgio2audio_probe(struct platform_device *pdev)
920920
struct snd_sgio2audio *chip;
921921
int err;
922922

923-
err = snd_card_create(index, id, THIS_MODULE, 0, &card);
923+
err = snd_card_new(&pdev->dev, index, id, THIS_MODULE, 0, &card);
924924
if (err < 0)
925925
return err;
926926

@@ -929,7 +929,6 @@ static int snd_sgio2audio_probe(struct platform_device *pdev)
929929
snd_card_free(card);
930930
return err;
931931
}
932-
snd_card_set_dev(card, &pdev->dev);
933932

934933
err = snd_sgio2audio_new_pcm(chip);
935934
if (err < 0) {

0 commit comments

Comments
 (0)