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:42 -0400 |
commit | 6ecaaf94b831827405613ee9110d8fb8eff92482 (patch) | |
tree | 24ca36ebd136e6f90b7b82c3825b538043e471ed /drivers/ide/ide-tape.c | |
parent | 1cc4376c259d1950817aaa6221aad7c2058df4a8 (diff) |
device create: ide: 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: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/ide/ide-tape.c')
-rw-r--r-- | drivers/ide/ide-tape.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c index b711ab96e287..353dd11b9283 100644 --- a/drivers/ide/ide-tape.c +++ b/drivers/ide/ide-tape.c | |||
@@ -2697,10 +2697,12 @@ static int ide_tape_probe(ide_drive_t *drive) | |||
2697 | 2697 | ||
2698 | idetape_setup(drive, tape, minor); | 2698 | idetape_setup(drive, tape, minor); |
2699 | 2699 | ||
2700 | device_create(idetape_sysfs_class, &drive->gendev, | 2700 | device_create_drvdata(idetape_sysfs_class, &drive->gendev, |
2701 | MKDEV(IDETAPE_MAJOR, minor), "%s", tape->name); | 2701 | MKDEV(IDETAPE_MAJOR, minor), NULL, |
2702 | device_create(idetape_sysfs_class, &drive->gendev, | 2702 | "%s", tape->name); |
2703 | MKDEV(IDETAPE_MAJOR, minor + 128), "n%s", tape->name); | 2703 | device_create_drvdata(idetape_sysfs_class, &drive->gendev, |
2704 | MKDEV(IDETAPE_MAJOR, minor + 128), NULL, | ||
2705 | "n%s", tape->name); | ||
2704 | 2706 | ||
2705 | g->fops = &idetape_block_ops; | 2707 | g->fops = &idetape_block_ops; |
2706 | ide_register_region(g); | 2708 | ide_register_region(g); |