[PATCH] SCSI: sgiwd93: remove use of legacy base field of host struct

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
Build tested only - I don't have a test system at hand atm.

 drivers/scsi/sgiwd93.c |   10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/drivers/scsi/sgiwd93.c b/drivers/scsi/sgiwd93.c
index fef0e3c..1b24e8d 100644
--- a/drivers/scsi/sgiwd93.c
+++ b/drivers/scsi/sgiwd93.c
@@ -36,6 +36,7 @@ struct ip22_hostdata {
 	dma_addr_t dma;
 	void *cpu;
 	struct device *dev;
+	struct hpc3_scsiregs *hregs;
 };
 
 #define host_to_hostdata(host) ((struct ip22_hostdata *)((host)->hostdata))
@@ -103,8 +104,7 @@ void fill_hpc_entries(struct ip22_hostdata *hd, struct scsi_cmnd *cmd, int din)
 static int dma_setup(struct scsi_cmnd *cmd, int datainp)
 {
 	struct ip22_hostdata *hdata = host_to_hostdata(cmd->device->host);
-	struct hpc3_scsiregs *hregs =
-		(struct hpc3_scsiregs *) cmd->device->host->base;
+	struct hpc3_scsiregs *hregs = hdata->hregs;
 
 	pr_debug("dma_setup: datainp<%d> hcp<%p> ", datainp, hdata->cpu);
 
@@ -137,7 +137,7 @@ static void dma_stop(struct Scsi_Host *instance, struct scsi_cmnd *SCpnt,
 		     int status)
 {
 	struct ip22_hostdata *hdata = host_to_hostdata(instance);
-	struct hpc3_scsiregs *hregs;
+	struct hpc3_scsiregs *hregs = hdata->hregs;
 
 	if (!SCpnt)
 		return;
@@ -145,8 +145,6 @@ static void dma_stop(struct Scsi_Host *instance, struct scsi_cmnd *SCpnt,
 	if (SCpnt->SCp.ptr == NULL || SCpnt->SCp.this_residual == 0)
 		return;
 
-	hregs = (struct hpc3_scsiregs *) SCpnt->device->host->base;
-
 	pr_debug("dma_stop: status<%d> ", status);
 
 	/* First stop the HPC and flush it's FIFO. */
@@ -244,10 +242,10 @@ static int __devinit sgiwd93_probe(struct platform_device *pdev)
 		goto out;
 	}
 
-	host->base = (unsigned long) hregs;
 	host->irq = irq;
 
 	hdata = host_to_hostdata(host);
+	hdata->hregs = hregs;
 	hdata->dev = &pdev->dev;
 	hdata->cpu = dma_alloc_noncoherent(&pdev->dev, HPC_DMA_SIZE,
 					   &hdata->dma, GFP_KERNEL);
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux