diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2008-05-21 12:52:33 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-07-21 21:54:44 -0700 |
commit | 89409211ff97bf82295d1fb98ab18302a03e9199 (patch) | |
tree | df122211e80cb4998011bf6c4efc8e3cb8c67dc9 /sound/sound_core.c | |
parent | 9def0b9761ee096c3c539b427dfb1e52b373cdad (diff) | |
download | linux-89409211ff97bf82295d1fb98ab18302a03e9199.tar.bz2 |
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/sound_core.c')
-rw-r--r-- | sound/sound_core.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sound/sound_core.c b/sound/sound_core.c index dcfc1d5ce631..1b04259a4328 100644 --- a/sound/sound_core.c +++ b/sound/sound_core.c @@ -171,8 +171,9 @@ static int sound_insert_unit(struct sound_unit **list, const struct file_operati else sprintf(s->name, "sound/%s%d", name, r / SOUND_STEP); - device_create(sound_class, dev, MKDEV(SOUND_MAJOR, s->unit_minor), - s->name+6); + device_create_drvdata(sound_class, dev, + MKDEV(SOUND_MAJOR, s->unit_minor), + NULL, s->name+6); return r; fail: |