diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2008-05-21 15:52:33 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-07-22 00:54:43 -0400 |
commit | 43f98747d48195d92c4102c17d7175bf24df1801 (patch) | |
tree | 471daebd0e907366465daeeaa24a072c0e88d035 /arch/mips | |
parent | 97cd790e3a9cf2855676a461ac5c448f5843017d (diff) |
device create: mips: 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: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'arch/mips')
-rw-r--r-- | arch/mips/kernel/rtlx.c | 4 | ||||
-rw-r--r-- | arch/mips/sibyte/common/sb_tbprof.c | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/arch/mips/kernel/rtlx.c b/arch/mips/kernel/rtlx.c index b55641961232..dfd868b68364 100644 --- a/arch/mips/kernel/rtlx.c +++ b/arch/mips/kernel/rtlx.c | |||
@@ -522,8 +522,8 @@ static int __init rtlx_module_init(void) | |||
522 | atomic_set(&channel_wqs[i].in_open, 0); | 522 | atomic_set(&channel_wqs[i].in_open, 0); |
523 | mutex_init(&channel_wqs[i].mutex); | 523 | mutex_init(&channel_wqs[i].mutex); |
524 | 524 | ||
525 | dev = device_create(mt_class, NULL, MKDEV(major, i), | 525 | dev = device_create_drvdata(mt_class, NULL, MKDEV(major, i), |
526 | "%s%d", module_name, i); | 526 | NULL, "%s%d", module_name, i); |
527 | if (IS_ERR(dev)) { | 527 | if (IS_ERR(dev)) { |
528 | err = PTR_ERR(dev); | 528 | err = PTR_ERR(dev); |
529 | goto out_chrdev; | 529 | goto out_chrdev; |
diff --git a/arch/mips/sibyte/common/sb_tbprof.c b/arch/mips/sibyte/common/sb_tbprof.c index 28b012ab8dcb..66e3e3fb311f 100644 --- a/arch/mips/sibyte/common/sb_tbprof.c +++ b/arch/mips/sibyte/common/sb_tbprof.c | |||
@@ -576,7 +576,8 @@ static int __init sbprof_tb_init(void) | |||
576 | 576 | ||
577 | tb_class = tbc; | 577 | tb_class = tbc; |
578 | 578 | ||
579 | dev = device_create(tbc, NULL, MKDEV(SBPROF_TB_MAJOR, 0), "tb"); | 579 | dev = device_create_drvdata(tbc, NULL, MKDEV(SBPROF_TB_MAJOR, 0), |
580 | NULL, "tb"); | ||
580 | if (IS_ERR(dev)) { | 581 | if (IS_ERR(dev)) { |
581 | err = PTR_ERR(dev); | 582 | err = PTR_ERR(dev); |
582 | goto out_class; | 583 | goto out_class; |