[PATCH][SCSI] megaraid: Convert from "scsi.h" to <scsi.h> (and friends)

[PATCH][SCSI] megaraid: Convert from "scsi.h" to <scsi.h> (and friends)

Post by ricknu- » Tue, 08 Jan 2008 06:20:21

iterar James Bottomley < XXXX@XXXXX.COM >:

Oops, it were suppose to read "+#include <scsi/scsi.h>". I thought it always
went to include/ if you used <...> (which then would had given an error). Oh
well, it compiles again when also adding "#include <scsi/scsi_device.h>" (used,
at least, in the scsi_cmnd-structure).

Since TRUE/FALSE are defined in "scsi.h", they were converted to the generic names.

Do this looks alright? Forgot it were dependent on the patch-set who converted
all "Scsi_Cmnd" to "struct scsi_cmnd".

Convert compatibility-glue-include "scsi.h" to <scsi/scsi.h> and friends.

Signed-off-by: Richard Knutsson < XXXX@XXXXX.COM >
Do not have the hardware, but since it compiles I hope it is alright.

diff --git a/drivers/scsi/megaraid.c b/drivers/scsi/megaraid.c
index 66c6520..5e9edfd 100644
--- a/drivers/scsi/megaraid.c
+++ b/drivers/scsi/megaraid.c
@@ -48,8 +48,10 @@
#include <linux/dma-mapping.h>
#include <scsi/scsicam.h>

-#include "scsi.h"
+#include <scsi/scsi_cmnd.h>
+#include <scsi/scsi_device.h>
#include <scsi/scsi_host.h>
+#include <scsi/scsi.h>

#include "megaraid.h"

@@ -359,7 +361,7 @@ mega_runpendq(adapter_t *adapter)
* The command queuing entry point for the mid-layer.
static int
-megaraid_queue(Scsi_Cmnd *scmd, void (*done)(Scsi_Cmnd *))
+megaraid_queue(struct scsi_cmnd *scmd, void (*done)(struct scsi_cmnd *))
adapter_t *adapter;
scb_t *scb;
@@ -411,7 +413,7 @@ megaraid_queue(Scsi_Cmnd *scmd, void (*done)(Scsi_Cmnd *))
* commands.
static inline scb_t *
-mega_allocate_scb(adapter_t *adapter, Scsi_Cmnd *cmd)
+mega_allocate_scb(adapter_t *adapter, struct scsi_cmnd *cmd)
struct list_head *head = &adapter->free_list;
scb_t *scb;
@@ -443,7 +445,7 @@ mega_allocate_scb(adapter_t *adapter, Scsi_Cmnd *cmd)
* and the channel number.
static inline int
-mega_get_ldrv_num(adapter_t *adapter, Scsi_Cmnd *cmd, int channel)
+mega_get_ldrv_num(adapter_t *adapter, struct scsi_cmnd *cmd, int channel)
int tgt;
int ldrv_num;
@@ -506,7 +508,7 @@ mega_get_ldrv_num(adapter_t *adapter, Scsi_Cmnd *cmd, int
* boot settings.
static scb_t *
-mega_build_cmd(adapter_t *adapter, Scsi_Cmnd *cmd, int *busy)
+mega_build_cmd(adapter_t *adapter, struct scsi_cmnd *cmd, int *busy)
mega_ext_passthru *epthru;
mega_passthru *pthru;
@@ -944,7 +946,7 @@ mega_build_cmd(adapter_t *adapter, Scsi_Cmnd *cmd, int *busy)
* prepare a command for the scsi physical devices.
static mega_passthru *
-mega_prepare_passthru(adapter_t *adapter, scb_t *scb, Scsi_Cmnd *cmd,
+mega_prepare_passthru(adapter_t *adapter, scb_t *scb, struct scsi_cmnd *cmd,
int channel, int target)
mega_passthru *pthru;
@@ -1008,7 +1010,7 @@ mega_prepare_passthru(adapter_t *adapter, scb_t *scb,
Scsi_Cmnd *cmd,
* commands for devices which can take extended CDBs (>10 bytes)
static mega_ext_passthru *
-mega_prepare_extpassthru(adapter_t *adapter, scb_t *scb, Scsi_Cmnd *cmd,
+mega_prepare_extpassthru(adapter_t *adapter, scb_t *scb, struct scsi_cmnd *cmd,
int channel, int target)
mega_ext_passthru *epthru;
@@ -1410,7 +1412,7 @@ mega_cmd_done(adapter_t *adapter, u8 completed[], int
nstatus, int status)
mega_ext_passthru *epthru = NULL;
struct scatterlist *sgl;
- Scsi_Cmnd *cmd = NULL;
+ struct scsi_cmn