summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/NCR5380.h
diff options
context:
space:
mode:
authorFinn Thain <fthain@telegraphics.com.au>2016-10-10 00:46:53 -0400
committerMartin K. Petersen <martin.petersen@oracle.com>2016-11-08 17:29:48 -0500
commit61e1ce588b101f13a4c6f713b95d65551c8572e3 (patch)
tree1f573de63f995733b53184450afafd8c0ff54892 /drivers/scsi/NCR5380.h
parent820682b1b34ebb97434c4abc00c744870364e2be (diff)
scsi: ncr5380: Use correct types for device register accessors
For timeout values adopt unsigned long, which is the type of jiffies etc. For chip register values and bit masks pass u8, which is the return type of readb, inb etc. For device register offsets adopt unsigned int, as it is suitable for adding to base addresses. Pass the NCR5380_hostdata pointer to the board-specific routines instead of the Scsi_Host pointer. The board-specific code is concerned with hardware and not with SCSI protocol or the mid-layer. Signed-off-by: Finn Thain <fthain@telegraphics.com.au> Reviewed-by: Hannes Reinecke <hare@suse.com> Tested-by: Ondrej Zary <linux@rainbow-software.org> Tested-by: Michael Schmitz <schmitzmic@gmail.com> Acked-by: Russell King <rmk+kernel@armlinux.org.uk> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/NCR5380.h')
-rw-r--r--drivers/scsi/NCR5380.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/scsi/NCR5380.h b/drivers/scsi/NCR5380.h
index 02f20ff757ae..c2d8b78d1a38 100644
--- a/drivers/scsi/NCR5380.h
+++ b/drivers/scsi/NCR5380.h
@@ -302,10 +302,13 @@ static void NCR5380_reselect(struct Scsi_Host *instance);
302static struct scsi_cmnd *NCR5380_select(struct Scsi_Host *, struct scsi_cmnd *); 302static struct scsi_cmnd *NCR5380_select(struct Scsi_Host *, struct scsi_cmnd *);
303static int NCR5380_transfer_dma(struct Scsi_Host *instance, unsigned char *phase, int *count, unsigned char **data); 303static int NCR5380_transfer_dma(struct Scsi_Host *instance, unsigned char *phase, int *count, unsigned char **data);
304static int NCR5380_transfer_pio(struct Scsi_Host *instance, unsigned char *phase, int *count, unsigned char **data); 304static int NCR5380_transfer_pio(struct Scsi_Host *instance, unsigned char *phase, int *count, unsigned char **data);
305static int NCR5380_poll_politely2(struct Scsi_Host *, int, int, int, int, int, int, int); 305static int NCR5380_poll_politely2(struct Scsi_Host *,
306 unsigned int, u8, u8,
307 unsigned int, u8, u8, unsigned long);
306 308
307static inline int NCR5380_poll_politely(struct Scsi_Host *instance, 309static inline int NCR5380_poll_politely(struct Scsi_Host *instance,
308 int reg, int bit, int val, int wait) 310 unsigned int reg, u8 bit, u8 val,
311 unsigned long wait)
309{ 312{
310 return NCR5380_poll_politely2(instance, reg, bit, val, 313 return NCR5380_poll_politely2(instance, reg, bit, val,
311 reg, bit, val, wait); 314 reg, bit, val, wait);