[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>
This commit is contained in:
Родитель
6292d9aaf3
Коммит
b62735d9c6
|
@ -751,9 +751,8 @@ static void idescsi_setup (ide_drive_t *drive, idescsi_scsi_t *scsi)
|
|||
idescsi_add_settings(drive);
|
||||
}
|
||||
|
||||
static int ide_scsi_remove(struct device *dev)
|
||||
static void ide_scsi_remove(ide_drive_t *drive)
|
||||
{
|
||||
ide_drive_t *drive = to_ide_device(dev);
|
||||
struct Scsi_Host *scsihost = drive->driver_data;
|
||||
struct ide_scsi_obj *scsi = scsihost_to_idescsi(scsihost);
|
||||
struct gendisk *g = scsi->disk;
|
||||
|
@ -768,11 +767,9 @@ static int ide_scsi_remove(struct device *dev)
|
|||
|
||||
scsi_remove_host(scsihost);
|
||||
ide_scsi_put(scsi);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int ide_scsi_probe(struct device *);
|
||||
static int ide_scsi_probe(ide_drive_t *);
|
||||
|
||||
#ifdef CONFIG_PROC_FS
|
||||
static ide_proc_entry_t idescsi_proc[] = {
|
||||
|
@ -788,9 +785,9 @@ static ide_driver_t idescsi_driver = {
|
|||
.owner = THIS_MODULE,
|
||||
.name = "ide-scsi",
|
||||
.bus = &ide_bus_type,
|
||||
.probe = ide_scsi_probe,
|
||||
.remove = ide_scsi_remove,
|
||||
},
|
||||
.probe = ide_scsi_probe,
|
||||
.remove = ide_scsi_remove,
|
||||
.version = IDESCSI_VERSION,
|
||||
.media = ide_scsi,
|
||||
.supports_dsc_overlap = 0,
|
||||
|
@ -1119,9 +1116,8 @@ static struct scsi_host_template idescsi_template = {
|
|||
.proc_name = "ide-scsi",
|
||||
};
|
||||
|
||||
static int ide_scsi_probe(struct device *dev)
|
||||
static int ide_scsi_probe(ide_drive_t *drive)
|
||||
{
|
||||
ide_drive_t *drive = to_ide_device(dev);
|
||||
idescsi_scsi_t *idescsi;
|
||||
struct Scsi_Host *host;
|
||||
struct gendisk *g;
|
||||
|
|
Загрузка…
Ссылка в новой задаче