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>
This commit is contained in:

committed by
Martin K. Petersen

parent
25894d1f98
commit
820682b1b3
@@ -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;
|
||||
|
Reference in New Issue
Block a user