Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[SCSI] scsi-driver ultrastore replace Scsi_Cmnd with struct scsi_cmnd

Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>

authored by

Henrik Kretzschmar and committed by
James Bottomley
b4620233 f479ab87

+19 -16
+12 -11
drivers/scsi/ultrastor.c
··· 196 196 u32 sense_data PACKED; 197 197 /* The following fields are for software only. They are included in 198 198 the MSCP structure because they are associated with SCSI requests. */ 199 - void (*done)(Scsi_Cmnd *); 200 - Scsi_Cmnd *SCint; 199 + void (*done) (struct scsi_cmnd *); 200 + struct scsi_cmnd *SCint; 201 201 ultrastor_sg_list sglist[ULTRASTOR_24F_MAX_SG]; /* use larger size for 24F */ 202 202 }; 203 203 ··· 289 289 290 290 static void ultrastor_interrupt(int, void *, struct pt_regs *); 291 291 static irqreturn_t do_ultrastor_interrupt(int, void *, struct pt_regs *); 292 - static inline void build_sg_list(struct mscp *, Scsi_Cmnd *SCpnt); 292 + static inline void build_sg_list(struct mscp *, struct scsi_cmnd *SCpnt); 293 293 294 294 295 295 /* Always called with host lock held */ ··· 673 673 return buf; 674 674 } 675 675 676 - static inline void build_sg_list(struct mscp *mscp, Scsi_Cmnd *SCpnt) 676 + static inline void build_sg_list(struct mscp *mscp, struct scsi_cmnd *SCpnt) 677 677 { 678 678 struct scatterlist *sl; 679 679 long transfer_length = 0; ··· 694 694 mscp->transfer_data_length = transfer_length; 695 695 } 696 696 697 - static int ultrastor_queuecommand(Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *)) 697 + static int ultrastor_queuecommand(struct scsi_cmnd *SCpnt, 698 + void (*done) (struct scsi_cmnd *)) 698 699 { 699 700 struct mscp *my_mscp; 700 701 #if ULTRASTOR_MAX_CMDS > 1 ··· 834 833 835 834 */ 836 835 837 - static int ultrastor_abort(Scsi_Cmnd *SCpnt) 836 + static int ultrastor_abort(struct scsi_cmnd *SCpnt) 838 837 { 839 838 #if ULTRASTOR_DEBUG & UD_ABORT 840 839 char out[108]; ··· 844 843 unsigned int mscp_index; 845 844 unsigned char old_aborted; 846 845 unsigned long flags; 847 - void (*done)(Scsi_Cmnd *); 846 + void (*done)(struct scsi_cmnd *); 848 847 struct Scsi_Host *host = SCpnt->device->host; 849 848 850 849 if(config.slot) ··· 961 960 return SUCCESS; 962 961 } 963 962 964 - static int ultrastor_host_reset(Scsi_Cmnd * SCpnt) 963 + static int ultrastor_host_reset(struct scsi_cmnd * SCpnt) 965 964 { 966 965 unsigned long flags; 967 966 int i; ··· 1046 1045 unsigned int mscp_index; 1047 1046 #endif 1048 1047 struct mscp *mscp; 1049 - void (*done)(Scsi_Cmnd *); 1050 - Scsi_Cmnd *SCtmp; 1048 + void (*done) (struct scsi_cmnd *); 1049 + struct scsi_cmnd *SCtmp; 1051 1050 1052 1051 #if ULTRASTOR_MAX_CMDS == 1 1053 1052 mscp = &config.mscp[0]; ··· 1080 1079 return; 1081 1080 } 1082 1081 if (icm_status == 3) { 1083 - void (*done)(Scsi_Cmnd *) = mscp->done; 1082 + void (*done)(struct scsi_cmnd *) = mscp->done; 1084 1083 if (done) { 1085 1084 mscp->done = NULL; 1086 1085 mscp->SCint->result = DID_ABORT << 16;
+7 -5
drivers/scsi/ultrastor.h
··· 14 14 #define _ULTRASTOR_H 15 15 16 16 static int ultrastor_detect(struct scsi_host_template *); 17 - static const char *ultrastor_info(struct Scsi_Host * shpnt); 18 - static int ultrastor_queuecommand(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *)); 19 - static int ultrastor_abort(Scsi_Cmnd *); 20 - static int ultrastor_host_reset(Scsi_Cmnd *); 21 - static int ultrastor_biosparam(struct scsi_device *, struct block_device *, sector_t, int *); 17 + static const char *ultrastor_info(struct Scsi_Host *shpnt); 18 + static int ultrastor_queuecommand(struct scsi_cmnd *, 19 + void (*done)(struct scsi_cmnd *)); 20 + static int ultrastor_abort(struct scsi_cmnd *); 21 + static int ultrastor_host_reset(struct scsi_cmnd *); 22 + static int ultrastor_biosparam(struct scsi_device *, struct block_device *, 23 + sector_t, int *); 22 24 23 25 24 26 #define ULTRASTOR_14F_MAX_SG 16