summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/g_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/g_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/g_NCR5380.h')
-rw-r--r--drivers/scsi/g_NCR5380.h8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/scsi/g_NCR5380.h b/drivers/scsi/g_NCR5380.h
index ec4d70bef5e5..10191d1c488a 100644
--- a/drivers/scsi/g_NCR5380.h
+++ b/drivers/scsi/g_NCR5380.h
@@ -17,13 +17,9 @@
#define DRV_MODULE_NAME "g_NCR5380"
#define NCR5380_read(reg) \
- ioread8(((struct NCR5380_hostdata *)shost_priv(instance))->io + \
- ((struct NCR5380_hostdata *)shost_priv(instance))->offset + \
- (reg))
+ ioread8(hostdata->io + hostdata->offset + (reg))
#define NCR5380_write(reg, value) \
- iowrite8(value, ((struct NCR5380_hostdata *)shost_priv(instance))->io + \
- ((struct NCR5380_hostdata *)shost_priv(instance))->offset + \
- (reg))
+ iowrite8(value, hostdata->io + hostdata->offset + (reg))
#define NCR5380_implementation_fields \
int offset; \