device create: char: 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.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
Greg Kroah-Hartman
2008-05-21 12:52:33 -07:00
parent f79f060561
commit 47aa5793f7
18 changed files with 61 additions and 49 deletions
+2 -1
View File
@@ -500,7 +500,8 @@ static int __init dsp56k_init_driver(void)
err = PTR_ERR(dsp56k_class);
goto out_chrdev;
}
device_create(dsp56k_class, NULL, MKDEV(DSP56K_MAJOR, 0), "dsp56k");
device_create_drvdata(dsp56k_class, NULL, MKDEV(DSP56K_MAJOR, 0),
NULL, "dsp56k");
printk(banner);
goto out;