summaryrefslogtreecommitdiff
path: root/sound/core/init.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2008-05-21 23:52:33 +0400
committerGreg Kroah-Hartman <gregkh@suse.de>2008-07-22 08:54:44 +0400
commit89409211ff97bf82295d1fb98ab18302a03e9199 (patch)
treedf122211e80cb4998011bf6c4efc8e3cb8c67dc9 /sound/core/init.c
parent9def0b9761ee096c3c539b427dfb1e52b373cdad (diff)
downloadlinux-89409211ff97bf82295d1fb98ab18302a03e9199.tar.xz
device create: sound: convert device_create to device_create_drvdata
device_create() is race-prone, so use the race-free device_create_drvdata() instead as device_create() is going away. Cc: Jaroslav Kysela <perex@perex.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'sound/core/init.c')
-rw-r--r--sound/core/init.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sound/core/init.c b/sound/core/init.c
index 5c254d498ae0..df46bbc25dc2 100644
--- a/sound/core/init.c
+++ b/sound/core/init.c
@@ -548,8 +548,9 @@ int snd_card_register(struct snd_card *card)
snd_assert(card != NULL, return -EINVAL);
#ifndef CONFIG_SYSFS_DEPRECATED
if (!card->card_dev) {
- card->card_dev = device_create(sound_class, card->dev, 0,
- "card%i", card->number);
+ card->card_dev = device_create_drvdata(sound_class, card->dev,
+ MKDEV(0, 0), NULL,
+ "card%i", card->number);
if (IS_ERR(card->card_dev))
card->card_dev = NULL;
}