Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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>

authored by

Mikael Pettersson and committed by
Linus Torvalds
b62735d9 6292d9aa

+5 -9
+5 -9
drivers/scsi/ide-scsi.c
··· 751 751 idescsi_add_settings(drive); 752 752 } 753 753 754 - static int ide_scsi_remove(struct device *dev) 754 + static void ide_scsi_remove(ide_drive_t *drive) 755 755 { 756 - ide_drive_t *drive = to_ide_device(dev); 757 756 struct Scsi_Host *scsihost = drive->driver_data; 758 757 struct ide_scsi_obj *scsi = scsihost_to_idescsi(scsihost); 759 758 struct gendisk *g = scsi->disk; ··· 767 768 768 769 scsi_remove_host(scsihost); 769 770 ide_scsi_put(scsi); 770 - 771 - return 0; 772 771 } 773 772 774 - static int ide_scsi_probe(struct device *); 773 + static int ide_scsi_probe(ide_drive_t *); 775 774 776 775 #ifdef CONFIG_PROC_FS 777 776 static ide_proc_entry_t idescsi_proc[] = { ··· 785 788 .owner = THIS_MODULE, 786 789 .name = "ide-scsi", 787 790 .bus = &ide_bus_type, 788 - .probe = ide_scsi_probe, 789 - .remove = ide_scsi_remove, 790 791 }, 792 + .probe = ide_scsi_probe, 793 + .remove = ide_scsi_remove, 791 794 .version = IDESCSI_VERSION, 792 795 .media = ide_scsi, 793 796 .supports_dsc_overlap = 0, ··· 1116 1119 .proc_name = "ide-scsi", 1117 1120 }; 1118 1121 1119 - static int ide_scsi_probe(struct device *dev) 1122 + static int ide_scsi_probe(ide_drive_t *drive) 1120 1123 { 1121 - ide_drive_t *drive = to_ide_device(dev); 1122 1124 idescsi_scsi_t *idescsi; 1123 1125 struct Scsi_Host *host; 1124 1126 struct gendisk *g;