IDE: Convert from class_device to device for ide-tape
authorTony Jones <tonyj@suse.de>
Tue, 25 Sep 2007 00:03:03 +0000 (02:03 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 25 Jan 2008 04:40:05 +0000 (20:40 -0800)
Signed-off-by: Tony Jones <tonyj@suse.de>
Cc: Gadi Oxman <gadio@netvision.net.il>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/ide/ide-tape.c

index 7b9181b5469d3be9d3e8e0929c5a0c2d4122c8d5..1495792d791734cdfa2763b64eac67d998e13a25 100644 (file)
@@ -4724,10 +4724,8 @@ static void ide_tape_release(struct kref *kref)
 
        drive->dsc_overlap = 0;
        drive->driver_data = NULL;
-       class_device_destroy(idetape_sysfs_class,
-                       MKDEV(IDETAPE_MAJOR, tape->minor));
-       class_device_destroy(idetape_sysfs_class,
-                       MKDEV(IDETAPE_MAJOR, tape->minor + 128));
+       device_destroy(idetape_sysfs_class, MKDEV(IDETAPE_MAJOR, tape->minor));
+       device_destroy(idetape_sysfs_class, MKDEV(IDETAPE_MAJOR, tape->minor + 128));
        idetape_devs[tape->minor] = NULL;
        g->private_data = NULL;
        put_disk(g);
@@ -4884,10 +4882,10 @@ static int ide_tape_probe(ide_drive_t *drive)
 
        idetape_setup(drive, tape, minor);
 
-       class_device_create(idetape_sysfs_class, NULL,
-                       MKDEV(IDETAPE_MAJOR, minor), &drive->gendev, "%s", tape->name);
-       class_device_create(idetape_sysfs_class, NULL,
-                       MKDEV(IDETAPE_MAJOR, minor + 128), &drive->gendev, "n%s", tape->name);
+       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);
 
        g->fops = &idetape_block_ops;
        ide_register_region(g);