aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/sound/core.h2
-rw-r--r--sound/core/pcm.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/include/sound/core.h b/include/sound/core.h
index 3c493ad620d1..4b9e609975ab 100644
--- a/include/sound/core.h
+++ b/include/sound/core.h
@@ -242,7 +242,7 @@ static inline int snd_register_device(int type, struct snd_card *card, int dev,
242{ 242{
243 return snd_register_device_for_dev(type, card, dev, f_ops, 243 return snd_register_device_for_dev(type, card, dev, f_ops,
244 private_data, name, 244 private_data, name,
245 card ? card->dev : NULL); 245 snd_card_get_device_link(card));
246} 246}
247 247
248int snd_unregister_device(int type, struct snd_card *card, int dev); 248int snd_unregister_device(int type, struct snd_card *card, int dev);
diff --git a/sound/core/pcm.c b/sound/core/pcm.c
index 76fcc5234d83..2743414fc8fa 100644
--- a/sound/core/pcm.c
+++ b/sound/core/pcm.c
@@ -968,7 +968,7 @@ static int snd_pcm_dev_register(struct snd_device *device)
968 * if possible */ 968 * if possible */
969 dev = pcm->dev; 969 dev = pcm->dev;
970 if (!dev) 970 if (!dev)
971 dev = pcm->card ? pcm->card->dev : NULL; 971 dev = snd_card_get_device_link(pcm->card);
972 /* register pcm */ 972 /* register pcm */
973 err = snd_register_device_for_dev(devtype, pcm->card, 973 err = snd_register_device_for_dev(devtype, pcm->card,
974 pcm->device, 974 pcm->device,