diff options
author | Finn Thain <fthain@telegraphics.com.au> | 2016-10-10 00:46:53 -0400 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2016-11-08 17:29:48 -0500 |
commit | 820682b1b34ebb97434c4abc00c744870364e2be (patch) | |
tree | 17a46d67ebc54a071dbc3add04c3064a95522f6c /drivers/scsi/sun3_scsi.c | |
parent | 25894d1f98aed363bf03e2509d0237c69ab0c8ec (diff) | |
download | lwn-820682b1b34ebb97434c4abc00c744870364e2be.tar.gz lwn-820682b1b34ebb97434c4abc00c744870364e2be.zip |
scsi: ncr5380: Store IO ports and addresses in host private data
The various 5380 drivers inconsistently store register pointers
either in the Scsi_Host struct "legacy crap" area or in special,
board-specific members of the NCR5380_hostdata struct. Uniform
use of the latter struct makes for simpler and faster code (see
the following patches) and helps to reduce use of the
NCR5380_implementation_fields macro.
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/sun3_scsi.c')
-rw-r--r-- | drivers/scsi/sun3_scsi.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/scsi/sun3_scsi.c b/drivers/scsi/sun3_scsi.c index 3c4c07038948..efee144c6056 100644 --- a/drivers/scsi/sun3_scsi.c +++ b/drivers/scsi/sun3_scsi.c @@ -428,6 +428,7 @@ static struct scsi_host_template sun3_scsi_template = { static int __init sun3_scsi_probe(struct platform_device *pdev) { struct Scsi_Host *instance; + struct NCR5380_hostdata *hostdata; int error; struct resource *irq, *mem; unsigned char *ioaddr; @@ -502,9 +503,11 @@ static int __init sun3_scsi_probe(struct platform_device *pdev) goto fail_alloc; } - instance->io_port = (unsigned long)ioaddr; instance->irq = irq->start; + hostdata = shost_priv(instance); + hostdata->base = (unsigned long)ioaddr; + error = NCR5380_init(instance, host_flags); if (error) goto fail_init; |