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>
This commit is contained in:
parent
9def0b9761
commit
89409211ff
3 changed files with 14 additions and 10 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue