diff options
Diffstat (limited to 'sound/atmel/ac97c.c')
-rw-r--r-- | sound/atmel/ac97c.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/sound/atmel/ac97c.c b/sound/atmel/ac97c.c index c5f0ddd729b3..05ec049c9faf 100644 --- a/sound/atmel/ac97c.c +++ b/sound/atmel/ac97c.c | |||
@@ -945,8 +945,9 @@ static int atmel_ac97c_probe(struct platform_device *pdev) | |||
945 | } | 945 | } |
946 | clk_enable(pclk); | 946 | clk_enable(pclk); |
947 | 947 | ||
948 | retval = snd_card_create(SNDRV_DEFAULT_IDX1, SNDRV_DEFAULT_STR1, | 948 | retval = snd_card_new(&pdev->dev, SNDRV_DEFAULT_IDX1, |
949 | THIS_MODULE, sizeof(struct atmel_ac97c), &card); | 949 | SNDRV_DEFAULT_STR1, THIS_MODULE, |
950 | sizeof(struct atmel_ac97c), &card); | ||
950 | if (retval) { | 951 | if (retval) { |
951 | dev_dbg(&pdev->dev, "could not create sound card device\n"); | 952 | dev_dbg(&pdev->dev, "could not create sound card device\n"); |
952 | goto err_snd_card_new; | 953 | goto err_snd_card_new; |
@@ -990,8 +991,6 @@ static int atmel_ac97c_probe(struct platform_device *pdev) | |||
990 | chip->reset_pin = -EINVAL; | 991 | chip->reset_pin = -EINVAL; |
991 | } | 992 | } |
992 | 993 | ||
993 | snd_card_set_dev(card, &pdev->dev); | ||
994 | |||
995 | atmel_ac97c_reset(chip); | 994 | atmel_ac97c_reset(chip); |
996 | 995 | ||
997 | /* Enable overrun interrupt from codec channel */ | 996 | /* Enable overrun interrupt from codec channel */ |
@@ -1113,8 +1112,6 @@ err_dma: | |||
1113 | chip->dma.tx_chan = NULL; | 1112 | chip->dma.tx_chan = NULL; |
1114 | } | 1113 | } |
1115 | err_ac97_bus: | 1114 | err_ac97_bus: |
1116 | snd_card_set_dev(card, NULL); | ||
1117 | |||
1118 | if (gpio_is_valid(chip->reset_pin)) | 1115 | if (gpio_is_valid(chip->reset_pin)) |
1119 | gpio_free(chip->reset_pin); | 1116 | gpio_free(chip->reset_pin); |
1120 | 1117 | ||
@@ -1195,7 +1192,6 @@ static int atmel_ac97c_remove(struct platform_device *pdev) | |||
1195 | chip->dma.tx_chan = NULL; | 1192 | chip->dma.tx_chan = NULL; |
1196 | } | 1193 | } |
1197 | 1194 | ||
1198 | snd_card_set_dev(card, NULL); | ||
1199 | snd_card_free(card); | 1195 | snd_card_free(card); |
1200 | 1196 | ||
1201 | return 0; | 1197 | return 0; |