Commit b62735d9c6212de6fd1b5e96b41d978939fb0dd2

Authored by Mikael Pettersson
Committed by Linus Torvalds
1 parent 6292d9aaf3

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

Showing 1 changed file with 5 additions and 9 deletions Side-by-side Diff

drivers/scsi/ide-scsi.c
... ... @@ -751,9 +751,8 @@
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;
760 759  
... ... @@ -768,11 +767,9 @@
768 767  
769 768 scsi_remove_host(scsihost);
770 769 ide_scsi_put(scsi);
771   -
772   - return 0;
773 770 }
774 771  
775   -static int ide_scsi_probe(struct device *);
  772 +static int ide_scsi_probe(ide_drive_t *);
776 773  
777 774 #ifdef CONFIG_PROC_FS
778 775 static ide_proc_entry_t idescsi_proc[] = {
779 776  
... ... @@ -788,9 +785,9 @@
788 785 .owner = THIS_MODULE,
789 786 .name = "ide-scsi",
790 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 791 .version = IDESCSI_VERSION,
795 792 .media = ide_scsi,
796 793 .supports_dsc_overlap = 0,
797 794  
... ... @@ -1119,9 +1116,8 @@
1119 1116 .proc_name = "ide-scsi",
1120 1117 };
1121 1118  
1122   -static int ide_scsi_probe(struct device *dev)
  1119 +static int ide_scsi_probe(ide_drive_t *drive)
1123 1120 {
1124   - ide_drive_t *drive = to_ide_device(dev);
1125 1121 idescsi_scsi_t *idescsi;
1126 1122 struct Scsi_Host *host;
1127 1123 struct gendisk *g;