From 01d08aa9cc8c5678735ba0bd69193d8e14ac678e Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Fri, 10 Sep 2004 05:55:22 -0400 Subject: [PATCH] [PATCH] avoid obsolete APIs in ide-scsi Signed-off-by: James Bottomley --- drivers/scsi/ide-scsi.c | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/drivers/scsi/ide-scsi.c b/drivers/scsi/ide-scsi.c index 4f2a284c2056e..7c63c92769785 100644 --- a/drivers/scsi/ide-scsi.c +++ b/drivers/scsi/ide-scsi.c @@ -50,8 +50,11 @@ #include #include -#include "scsi.h" +#include +#include +#include #include +#include #include #define IDESCSI_DEBUG_LOG 0 @@ -66,8 +69,8 @@ typedef struct idescsi_pc_s { u8 *current_position; /* Pointer into the above buffer */ struct scatterlist *sg; /* Scatter gather table */ int b_count; /* Bytes transferred from current entry */ - Scsi_Cmnd *scsi_cmd; /* SCSI command */ - void (*done)(Scsi_Cmnd *); /* Scsi completion routine */ + struct scsi_cmnd *scsi_cmd; /* SCSI command */ + void (*done)(struct scsi_cmnd *); /* Scsi completion routine */ unsigned long flags; /* Status/Action flags */ unsigned long timeout; /* Command timeout */ } idescsi_pc_t; @@ -747,7 +750,7 @@ static struct block_device_operations idescsi_ops = { static int idescsi_attach(ide_drive_t *drive); -static int idescsi_slave_configure(Scsi_Device * sdp) +static int idescsi_slave_configure(struct scsi_device * sdp) { /* Configure detected device */ scsi_adjust_queue_depth(sdp, MSG_SIMPLE_TAG, sdp->host->cmd_per_lun); @@ -759,7 +762,7 @@ static const char *idescsi_info (struct Scsi_Host *host) return "SCSI host adapter emulation for IDE ATAPI devices"; } -static int idescsi_ioctl (Scsi_Device *dev, int cmd, void __user *arg) +static int idescsi_ioctl (struct scsi_device *dev, int cmd, void __user *arg) { idescsi_scsi_t *scsi = scsihost_to_idescsi(dev->host); @@ -849,7 +852,7 @@ static inline struct bio *idescsi_dma_bio(ide_drive_t *drive, idescsi_pc_t *pc) return first_bh; } -static inline int should_transform(ide_drive_t *drive, Scsi_Cmnd *cmd) +static inline int should_transform(ide_drive_t *drive, struct scsi_cmnd *cmd) { idescsi_scsi_t *scsi = drive_to_idescsi(drive); @@ -867,7 +870,8 @@ static inline int should_transform(ide_drive_t *drive, Scsi_Cmnd *cmd) return test_bit(IDESCSI_TRANSFORM, &scsi->transform); } -static int idescsi_queue (Scsi_Cmnd *cmd, void (*done)(Scsi_Cmnd *)) +static int idescsi_queue (struct scsi_cmnd *cmd, + void (*done)(struct scsi_cmnd *)) { struct Scsi_Host *host = cmd->device->host; idescsi_scsi_t *scsi = scsihost_to_idescsi(host); @@ -933,7 +937,7 @@ abort: return 1; } -static int idescsi_eh_abort (Scsi_Cmnd *cmd) +static int idescsi_eh_abort (struct scsi_cmnd *cmd) { idescsi_scsi_t *scsi = scsihost_to_idescsi(cmd->device->host); ide_drive_t *drive = scsi->drive; @@ -992,7 +996,7 @@ no_drive: return ret; } -static int idescsi_eh_reset (Scsi_Cmnd *cmd) +static int idescsi_eh_reset (struct scsi_cmnd *cmd) { struct request *req; idescsi_scsi_t *scsi = scsihost_to_idescsi(cmd->device->host); @@ -1075,7 +1079,7 @@ static int idescsi_bios(struct scsi_device *sdev, struct block_device *bdev, return 0; } -static Scsi_Host_Template idescsi_template = { +static struct scsi_host_template idescsi_template = { .module = THIS_MODULE, .name = "idescsi", .info = idescsi_info, -- 2.53.0