aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/ide-scsi.c
diff options
context:
space:
mode:
authorMikael Pettersson <mikpe@csd.uu.se>2006-02-01 06:04:45 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-02-01 11:53:09 -0500
commitb62735d9c6212de6fd1b5e96b41d978939fb0dd2 (patch)
tree54392e5858df6c34ce65998e15e230e475ef6b1f /drivers/scsi/ide-scsi.c
parent6292d9aaf3047f1abd970bc64ab6d952eda258ac (diff)
[PATCH] ide-scsi: fix for IDE probe/remove ops changes
Kernel 2.6.16-rc1 broke the ide-scsi driver: ide-scsi loads but fails to find any devices to bind to. It also triggers a message "Driver 'ide-scsi' needs updating - please use bus_type methods" from the driver core. The IDE core in 2.6.16-rc1 changed the location of an IDE driver's ->probe()/->remove()/->shutdown() methods: they are now in the ide_driver_t struct not in the gen_driver sub-struct. drivers/ide/ was updated for this change but ide-scsi.c wasn't. Hence the breakage. This patch repairs ide-scsi and also eliminates the driver core warning. Signed-off-by: Mikael Pettersson <mikpe@csd.uu.se> Cc: Russell King <rmk@arm.linux.org.uk> Cc: Greg KH <greg@kroah.com> Acked-by: Bartlomiej Zolnierkiewicz <B.Zolnierkiewicz@elka.pw.edu.pl> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/scsi/ide-scsi.c')
-rw-r--r--drivers/scsi/ide-scsi.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/drivers/scsi/ide-scsi.c b/drivers/scsi/ide-scsi.c
index 3c688ef54660..0cf0e4c7ac0c 100644
--- a/drivers/scsi/ide-scsi.c
+++ b/drivers/scsi/ide-scsi.c
@@ -751,9 +751,8 @@ static void idescsi_setup (ide_drive_t *drive, idescsi_scsi_t *scsi)
751 idescsi_add_settings(drive); 751 idescsi_add_settings(drive);
752} 752}
753 753
754static int ide_scsi_remove(struct device *dev) 754static void ide_scsi_remove(ide_drive_t *drive)
755{ 755{
756 ide_drive_t *drive = to_ide_device(dev);
757 struct Scsi_Host *scsihost = drive->driver_data; 756 struct Scsi_Host *scsihost = drive->driver_data;
758 struct ide_scsi_obj *scsi = scsihost_to_idescsi(scsihost); 757 struct ide_scsi_obj *scsi = scsihost_to_idescsi(scsihost);
759 struct gendisk *g = scsi->disk; 758 struct gendisk *g = scsi->disk;
@@ -768,11 +767,9 @@ static int ide_scsi_remove(struct device *dev)
768 767
769 scsi_remove_host(scsihost); 768 scsi_remove_host(scsihost);
770 ide_scsi_put(scsi); 769 ide_scsi_put(scsi);
771
772 return 0;
773} 770}
774 771
775static int ide_scsi_probe(struct device *); 772static int ide_scsi_probe(ide_drive_t *);
776 773
777#ifdef CONFIG_PROC_FS 774#ifdef CONFIG_PROC_FS
778static ide_proc_entry_t idescsi_proc[] = { 775static ide_proc_entry_t idescsi_proc[] = {
@@ -788,9 +785,9 @@ static ide_driver_t idescsi_driver = {
788 .owner = THIS_MODULE, 785 .owner = THIS_MODULE,
789 .name = "ide-scsi", 786 .name = "ide-scsi",
790 .bus = &ide_bus_type, 787 .bus = &ide_bus_type,
791 .probe = ide_scsi_probe,
792 .remove = ide_scsi_remove,
793 }, 788 },
789 .probe = ide_scsi_probe,
790 .remove = ide_scsi_remove,
794 .version = IDESCSI_VERSION, 791 .version = IDESCSI_VERSION,
795 .media = ide_scsi, 792 .media = ide_scsi,
796 .supports_dsc_overlap = 0, 793 .supports_dsc_overlap = 0,
@@ -1119,9 +1116,8 @@ static struct scsi_host_template idescsi_template = {
1119 .proc_name = "ide-scsi", 1116 .proc_name = "ide-scsi",
1120}; 1117};
1121 1118
1122static int ide_scsi_probe(struct device *dev) 1119static int ide_scsi_probe(ide_drive_t *drive)
1123{ 1120{
1124 ide_drive_t *drive = to_ide_device(dev);
1125 idescsi_scsi_t *idescsi; 1121 idescsi_scsi_t *idescsi;
1126 struct Scsi_Host *host; 1122 struct Scsi_Host *host;
1127 struct gendisk *g; 1123 struct gendisk *g;