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/oss/soundcard.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'sound/oss') diff --git a/sound/oss/soundcard.c b/sound/oss/soundcard.c index a9c23b2502a..7d89c081a08 100644 --- a/sound/oss/soundcard.c +++ b/sound/oss/soundcard.c @@ -560,17 +560,19 @@ static int __init oss_init(void) sound_dmap_flag = (dmabuf > 0 ? 1 : 0); for (i = 0; i < ARRAY_SIZE(dev_list); i++) { - device_create(sound_class, NULL, - MKDEV(SOUND_MAJOR, dev_list[i].minor), - "%s", dev_list[i].name); + device_create_drvdata(sound_class, NULL, + MKDEV(SOUND_MAJOR, dev_list[i].minor), + NULL, "%s", dev_list[i].name); if (!dev_list[i].num) continue; for (j = 1; j < *dev_list[i].num; j++) - device_create(sound_class, NULL, - MKDEV(SOUND_MAJOR, dev_list[i].minor + (j*0x10)), - "%s%d", dev_list[i].name, j); + device_create_drvdata(sound_class, NULL, + MKDEV(SOUND_MAJOR, + dev_list[i].minor + (j*0x10)), + NULL, + "%s%d", dev_list[i].name, j); } if (sound_nblocks >= 1024) -- cgit v1.2.3