diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2008-05-21 23:52:33 +0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-07-22 08:54:41 +0400 |
commit | 47aa5793f78c274d51711f6a621fa6b02d4e6402 (patch) | |
tree | 88c45b3a90fc7d7b4210bf5727497294b0a951eb /drivers/char/vt.c | |
parent | f79f060561d04a38d41e773ade9baafce3c96179 (diff) | |
download | linux-47aa5793f78c274d51711f6a621fa6b02d4e6402.tar.xz |
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>
Diffstat (limited to 'drivers/char/vt.c')
-rw-r--r-- | drivers/char/vt.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/char/vt.c b/drivers/char/vt.c index 935f1c207a1f..e32a076d5f1f 100644 --- a/drivers/char/vt.c +++ b/drivers/char/vt.c @@ -3425,9 +3425,10 @@ int register_con_driver(const struct consw *csw, int first, int last) if (retval) goto err; - con_driver->dev = device_create(vtconsole_class, NULL, - MKDEV(0, con_driver->node), - "vtcon%i", con_driver->node); + con_driver->dev = device_create_drvdata(vtconsole_class, NULL, + MKDEV(0, con_driver->node), + NULL, "vtcon%i", + con_driver->node); if (IS_ERR(con_driver->dev)) { printk(KERN_WARNING "Unable to create device for %s; " @@ -3535,9 +3536,10 @@ static int __init vtconsole_class_init(void) struct con_driver *con = ®istered_con_driver[i]; if (con->con && !con->dev) { - con->dev = device_create(vtconsole_class, NULL, - MKDEV(0, con->node), - "vtcon%i", con->node); + con->dev = device_create_drvdata(vtconsole_class, NULL, + MKDEV(0, con->node), + NULL, "vtcon%i", + con->node); if (IS_ERR(con->dev)) { printk(KERN_WARNING "Unable to create " |