aboutsummaryrefslogtreecommitdiffstats
path: root/sound/oss/soundcard.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2008-05-21 15:52:33 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2008-07-22 00:54:44 -0400
commit89409211ff97bf82295d1fb98ab18302a03e9199 (patch)
treedf122211e80cb4998011bf6c4efc8e3cb8c67dc9 /sound/oss/soundcard.c
parent9def0b9761ee096c3c539b427dfb1e52b373cdad (diff)
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/oss/soundcard.c')
-rw-r--r--sound/oss/soundcard.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/sound/oss/soundcard.c b/sound/oss/soundcard.c
index a9c23b2502ad..7d89c081a086 100644
--- a/sound/oss/soundcard.c
+++ b/sound/oss/soundcard.c
@@ -560,17 +560,19 @@ static int __init oss_init(void)
560 sound_dmap_flag = (dmabuf > 0 ? 1 : 0); 560 sound_dmap_flag = (dmabuf > 0 ? 1 : 0);
561 561
562 for (i = 0; i < ARRAY_SIZE(dev_list); i++) { 562 for (i = 0; i < ARRAY_SIZE(dev_list); i++) {
563 device_create(sound_class, NULL, 563 device_create_drvdata(sound_class, NULL,
564 MKDEV(SOUND_MAJOR, dev_list[i].minor), 564 MKDEV(SOUND_MAJOR, dev_list[i].minor),
565 "%s", dev_list[i].name); 565 NULL, "%s", dev_list[i].name);
566 566
567 if (!dev_list[i].num) 567 if (!dev_list[i].num)
568 continue; 568 continue;
569 569
570 for (j = 1; j < *dev_list[i].num; j++) 570 for (j = 1; j < *dev_list[i].num; j++)
571 device_create(sound_class, NULL, 571 device_create_drvdata(sound_class, NULL,
572 MKDEV(SOUND_MAJOR, dev_list[i].minor + (j*0x10)), 572 MKDEV(SOUND_MAJOR,
573 "%s%d", dev_list[i].name, j); 573 dev_list[i].minor + (j*0x10)),
574 NULL,
575 "%s%d", dev_list[i].name, j);
574 } 576 }
575 577
576 if (sound_nblocks >= 1024) 578 if (sound_nblocks >= 1024)