Skip to contentSkip to conversation

avoid obsolete APIs in ide-scsi

PATCH New Christoph Hellwig 1 participant 1 message Sep 5, 2004 SCSI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 avoid obsolete APIs in ide-scsi

drivers/scsi/ide-scsi.c +14 -10
@@ -50,8 +50,11 @@
 #include <asm/bitops.h>
 #include <asm/uaccess.h>
 
-#include "scsi.h"
+#include <scsi/scsi.h>
+#include <scsi/scsi_cmnd.h>
+#include <scsi/scsi_device.h>
 #include <scsi/scsi_host.h>
+#include <scsi/scsi_tcq.h>
 #include <scsi/sg.h>
 
 #define IDESCSI_DEBUG_LOG		0
@@ -66,8 +69,8 @@
 	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 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 @@
 	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 @@
 	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 @@
 	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 @@
 	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 @@
 	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 @@
 	return 0;
 }
 
-static Scsi_Host_Template idescsi_template = {
+static struct scsi_host_template idescsi_template = {
 	.module			= THIS_MODULE,
 	.name			= "idescsi",
 	.info			= idescsi_info,

===== drivers/scsi/scsi_devinfo.c 1.24 vs edited =====