diff options
author | Russell King <rmk@arm.linux.org.uk> | 2006-01-06 06:41:00 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-01-13 14:26:10 -0500 |
commit | 4031bbe4bbec6c0fe50412ef7fb43a270b0f29f1 (patch) | |
tree | 1e1449ba492ab04d8c5fbc75f9761be237bcae72 /drivers/ide/ide-tape.c | |
parent | bbbe3a41f7ee529f7f4fdcc1bc1157234bac0766 (diff) |
[PATCH] Add ide_bus_type probe and remove methods
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
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 | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c index fab9b2b0250..0101d0def7c 100644 --- a/drivers/ide/ide-tape.c +++ b/drivers/ide/ide-tape.c | |||
@@ -4682,9 +4682,8 @@ static void idetape_setup (ide_drive_t *drive, idetape_tape_t *tape, int minor) | |||
4682 | idetape_add_settings(drive); | 4682 | idetape_add_settings(drive); |
4683 | } | 4683 | } |
4684 | 4684 | ||
4685 | static int ide_tape_remove(struct device *dev) | 4685 | static void ide_tape_remove(ide_drive_t *drive) |
4686 | { | 4686 | { |
4687 | ide_drive_t *drive = to_ide_device(dev); | ||
4688 | idetape_tape_t *tape = drive->driver_data; | 4687 | idetape_tape_t *tape = drive->driver_data; |
4689 | 4688 | ||
4690 | ide_unregister_subdriver(drive, tape->driver); | 4689 | ide_unregister_subdriver(drive, tape->driver); |
@@ -4692,8 +4691,6 @@ static int ide_tape_remove(struct device *dev) | |||
4692 | ide_unregister_region(tape->disk); | 4691 | ide_unregister_region(tape->disk); |
4693 | 4692 | ||
4694 | ide_tape_put(tape); | 4693 | ide_tape_put(tape); |
4695 | |||
4696 | return 0; | ||
4697 | } | 4694 | } |
4698 | 4695 | ||
4699 | static void ide_tape_release(struct kref *kref) | 4696 | static void ide_tape_release(struct kref *kref) |
@@ -4745,16 +4742,16 @@ static ide_proc_entry_t idetape_proc[] = { | |||
4745 | 4742 | ||
4746 | #endif | 4743 | #endif |
4747 | 4744 | ||
4748 | static int ide_tape_probe(struct device *); | 4745 | static int ide_tape_probe(ide_drive_t *); |
4749 | 4746 | ||
4750 | static ide_driver_t idetape_driver = { | 4747 | static ide_driver_t idetape_driver = { |
4751 | .gen_driver = { | 4748 | .gen_driver = { |
4752 | .owner = THIS_MODULE, | 4749 | .owner = THIS_MODULE, |
4753 | .name = "ide-tape", | 4750 | .name = "ide-tape", |
4754 | .bus = &ide_bus_type, | 4751 | .bus = &ide_bus_type, |
4755 | .probe = ide_tape_probe, | ||
4756 | .remove = ide_tape_remove, | ||
4757 | }, | 4752 | }, |
4753 | .probe = ide_tape_probe, | ||
4754 | .remove = ide_tape_remove, | ||
4758 | .version = IDETAPE_VERSION, | 4755 | .version = IDETAPE_VERSION, |
4759 | .media = ide_tape, | 4756 | .media = ide_tape, |
4760 | .supports_dsc_overlap = 1, | 4757 | .supports_dsc_overlap = 1, |
@@ -4825,9 +4822,8 @@ static struct block_device_operations idetape_block_ops = { | |||
4825 | .ioctl = idetape_ioctl, | 4822 | .ioctl = idetape_ioctl, |
4826 | }; | 4823 | }; |
4827 | 4824 | ||
4828 | static int ide_tape_probe(struct device *dev) | 4825 | static int ide_tape_probe(ide_drive_t *drive) |
4829 | { | 4826 | { |
4830 | ide_drive_t *drive = to_ide_device(dev); | ||
4831 | idetape_tape_t *tape; | 4827 | idetape_tape_t *tape; |
4832 | struct gendisk *g; | 4828 | struct gendisk *g; |
4833 | int minor; | 4829 | int minor; |
@@ -4883,9 +4879,9 @@ static int ide_tape_probe(struct device *dev) | |||
4883 | idetape_setup(drive, tape, minor); | 4879 | idetape_setup(drive, tape, minor); |
4884 | 4880 | ||
4885 | class_device_create(idetape_sysfs_class, NULL, | 4881 | class_device_create(idetape_sysfs_class, NULL, |
4886 | MKDEV(IDETAPE_MAJOR, minor), dev, "%s", tape->name); | 4882 | MKDEV(IDETAPE_MAJOR, minor), &drive->gendev, "%s", tape->name); |
4887 | class_device_create(idetape_sysfs_class, NULL, | 4883 | class_device_create(idetape_sysfs_class, NULL, |
4888 | MKDEV(IDETAPE_MAJOR, minor + 128), dev, "n%s", tape->name); | 4884 | MKDEV(IDETAPE_MAJOR, minor + 128), &drive->gendev, "n%s", tape->name); |
4889 | 4885 | ||
4890 | devfs_mk_cdev(MKDEV(HWIF(drive)->major, minor), | 4886 | devfs_mk_cdev(MKDEV(HWIF(drive)->major, minor), |
4891 | S_IFCHR | S_IRUGO | S_IWUGO, | 4887 | S_IFCHR | S_IRUGO | S_IWUGO, |