aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/vt.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:41 -0400
commit47aa5793f78c274d51711f6a621fa6b02d4e6402 (patch)
tree88c45b3a90fc7d7b4210bf5727497294b0a951eb /drivers/char/vt.c
parentf79f060561d04a38d41e773ade9baafce3c96179 (diff)
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.c14
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)
3425 if (retval) 3425 if (retval)
3426 goto err; 3426 goto err;
3427 3427
3428 con_driver->dev = device_create(vtconsole_class, NULL, 3428 con_driver->dev = device_create_drvdata(vtconsole_class, NULL,
3429 MKDEV(0, con_driver->node), 3429 MKDEV(0, con_driver->node),
3430 "vtcon%i", con_driver->node); 3430 NULL, "vtcon%i",
3431 con_driver->node);
3431 3432
3432 if (IS_ERR(con_driver->dev)) { 3433 if (IS_ERR(con_driver->dev)) {
3433 printk(KERN_WARNING "Unable to create device for %s; " 3434 printk(KERN_WARNING "Unable to create device for %s; "
@@ -3535,9 +3536,10 @@ static int __init vtconsole_class_init(void)
3535 struct con_driver *con = &registered_con_driver[i]; 3536 struct con_driver *con = &registered_con_driver[i];
3536 3537
3537 if (con->con && !con->dev) { 3538 if (con->con && !con->dev) {
3538 con->dev = device_create(vtconsole_class, NULL, 3539 con->dev = device_create_drvdata(vtconsole_class, NULL,
3539 MKDEV(0, con->node), 3540 MKDEV(0, con->node),
3540 "vtcon%i", con->node); 3541 NULL, "vtcon%i",
3542 con->node);
3541 3543
3542 if (IS_ERR(con->dev)) { 3544 if (IS_ERR(con->dev)) {
3543 printk(KERN_WARNING "Unable to create " 3545 printk(KERN_WARNING "Unable to create "