From 89409211ff97bf82295d1fb98ab18302a03e9199 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Wed, 21 May 2008 12:52:33 -0700 Subject: 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 Signed-off-by: Greg Kroah-Hartman --- sound/sound_core.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'sound/sound_core.c') diff --git a/sound/sound_core.c b/sound/sound_core.c index dcfc1d5ce63..1b04259a432 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: -- cgit v1.2.3