Commit 89235e55 authored by Takashi Iwai's avatar Takashi Iwai

thinkpad_acpi: Convert to snd_card_new() with a device pointer

Also remove superfluous snd_card_set_dev() calls.
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent e7356888
...@@ -6776,7 +6776,8 @@ static int __init volume_create_alsa_mixer(void) ...@@ -6776,7 +6776,8 @@ static int __init volume_create_alsa_mixer(void)
struct snd_kcontrol *ctl_mute; struct snd_kcontrol *ctl_mute;
int rc; int rc;
rc = snd_card_create(alsa_index, alsa_id, THIS_MODULE, rc = snd_card_new(&tpacpi_pdev->dev,
alsa_index, alsa_id, THIS_MODULE,
sizeof(struct tpacpi_alsa_data), &card); sizeof(struct tpacpi_alsa_data), &card);
if (rc < 0 || !card) { if (rc < 0 || !card) {
pr_err("Failed to create ALSA card structures: %d\n", rc); pr_err("Failed to create ALSA card structures: %d\n", rc);
...@@ -6828,7 +6829,6 @@ static int __init volume_create_alsa_mixer(void) ...@@ -6828,7 +6829,6 @@ static int __init volume_create_alsa_mixer(void)
} }
data->ctl_mute_id = &ctl_mute->id; data->ctl_mute_id = &ctl_mute->id;
snd_card_set_dev(card, &tpacpi_pdev->dev);
rc = snd_card_register(card); rc = snd_card_register(card);
if (rc < 0) { if (rc < 0) {
pr_err("Failed to register ALSA card: %d\n", rc); pr_err("Failed to register ALSA card: %d\n", rc);
......
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