diff options
-rw-r--r-- | drivers/ide/ide-tape.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c index 7b9181b5469d..1495792d7917 100644 --- a/drivers/ide/ide-tape.c +++ b/drivers/ide/ide-tape.c | |||
@@ -4724,10 +4724,8 @@ static void ide_tape_release(struct kref *kref) | |||
4724 | 4724 | ||
4725 | drive->dsc_overlap = 0; | 4725 | drive->dsc_overlap = 0; |
4726 | drive->driver_data = NULL; | 4726 | drive->driver_data = NULL; |
4727 | class_device_destroy(idetape_sysfs_class, | 4727 | device_destroy(idetape_sysfs_class, MKDEV(IDETAPE_MAJOR, tape->minor)); |
4728 | MKDEV(IDETAPE_MAJOR, tape->minor)); | 4728 | device_destroy(idetape_sysfs_class, MKDEV(IDETAPE_MAJOR, tape->minor + 128)); |
4729 | class_device_destroy(idetape_sysfs_class, | ||
4730 | MKDEV(IDETAPE_MAJOR, tape->minor + 128)); | ||
4731 | idetape_devs[tape->minor] = NULL; | 4729 | idetape_devs[tape->minor] = NULL; |
4732 | g->private_data = NULL; | 4730 | g->private_data = NULL; |
4733 | put_disk(g); | 4731 | put_disk(g); |
@@ -4884,10 +4882,10 @@ static int ide_tape_probe(ide_drive_t *drive) | |||
4884 | 4882 | ||
4885 | idetape_setup(drive, tape, minor); | 4883 | idetape_setup(drive, tape, minor); |
4886 | 4884 | ||
4887 | class_device_create(idetape_sysfs_class, NULL, | 4885 | device_create(idetape_sysfs_class, &drive->gendev, |
4888 | MKDEV(IDETAPE_MAJOR, minor), &drive->gendev, "%s", tape->name); | 4886 | MKDEV(IDETAPE_MAJOR, minor), "%s", tape->name); |
4889 | class_device_create(idetape_sysfs_class, NULL, | 4887 | device_create(idetape_sysfs_class, &drive->gendev, |
4890 | MKDEV(IDETAPE_MAJOR, minor + 128), &drive->gendev, "n%s", tape->name); | 4888 | MKDEV(IDETAPE_MAJOR, minor + 128), "n%s", tape->name); |
4891 | 4889 | ||
4892 | g->fops = &idetape_block_ops; | 4890 | g->fops = &idetape_block_ops; |
4893 | ide_register_region(g); | 4891 | ide_register_region(g); |