提交 6ecaaf94 编写于 作者: G Greg Kroah-Hartman

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: NGreg Kroah-Hartman <gregkh@suse.de>
上级 1cc4376c
......@@ -2697,10 +2697,12 @@ static int ide_tape_probe(ide_drive_t *drive)
idetape_setup(drive, tape, minor);
device_create(idetape_sysfs_class, &drive->gendev,
MKDEV(IDETAPE_MAJOR, minor), "%s", tape->name);
device_create(idetape_sysfs_class, &drive->gendev,
MKDEV(IDETAPE_MAJOR, minor + 128), "n%s", tape->name);
device_create_drvdata(idetape_sysfs_class, &drive->gendev,
MKDEV(IDETAPE_MAJOR, minor), NULL,
"%s", tape->name);
device_create_drvdata(idetape_sysfs_class, &drive->gendev,
MKDEV(IDETAPE_MAJOR, minor + 128), NULL,
"n%s", tape->name);
g->fops = &idetape_block_ops;
ide_register_region(g);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册