From: Greg Kroah-Hartman Date: Wed, 21 May 2008 19:52:33 +0000 (-0700) Subject: device create: ide: convert device_create to device_create_drvdata X-Git-Tag: v2.6.27-rc1~866^2~65 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=6ecaaf94b831827405613ee9110d8fb8eff92482;p=linux-2.6-omap-h63xx.git 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 Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c index b711ab96e28..353dd11b928 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) 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);