From: Ralf Baechle <ralf@linux-mips.org>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Christoph Hellwig <hch@infradead.org>,
"James E.J. Bottomley" <James.Bottomley@suse.de>,
linux-m68k@vger.kernel.org, linux-scsi@vger.kernel.org
Subject: [PATCH] SCSI: sgiwd93: remove use of legacy base field of host struct
Date: Fri, 23 Apr 2010 11:15:40 +0100 [thread overview]
Message-ID: <20100423101540.GA27244@linux-mips.org> (raw)
In-Reply-To: <s2z10f740e81004230140xd60ac9dbv8c904a3aa365edad@mail.gmail.com>
---
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);
next prev parent reply other threads:[~2010-04-23 11:08 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-04 9:00 [PATCH 0/21] m68k/scsi: wd33c93 driver cleanups Geert Uytterhoeven
2010-04-04 9:00 ` [PATCH 01/21] scsi: wd33c93 - Kill empty wd33c93_release() Geert Uytterhoeven
2010-04-04 9:00 ` [PATCH 02/21] m68k/scsi: a2091 - Reindentation Geert Uytterhoeven
2010-04-04 9:00 ` [PATCH 03/21] m68k/scsi: gvp11 " Geert Uytterhoeven
2010-04-04 9:00 ` [PATCH 04/21] m68k/scsi: mvme147 " Geert Uytterhoeven
2010-04-04 9:00 ` [PATCH 05/21] m68k/scsi: a3000 " Geert Uytterhoeven
2010-04-04 9:00 ` [PATCH 06/21] m68k/scsi: a2091 - Use shost_priv() and kill ugly HDATA() macro Geert Uytterhoeven
2010-04-04 9:00 ` [PATCH 07/21] m68k/scsi: gvp11 " Geert Uytterhoeven
2010-04-04 9:00 ` [PATCH 08/21] m68k/scsi: mvme147 " Geert Uytterhoeven
2010-04-04 9:00 ` [PATCH 09/21] m68k/scsi: a3000 " Geert Uytterhoeven
2010-04-04 9:00 ` [PATCH 10/21] m68k/scsi: a2091 - Kill ugly DMA() macro Geert Uytterhoeven
2010-04-04 9:00 ` [PATCH 11/21] m68k/scsi: gvp11 " Geert Uytterhoeven
2010-04-04 9:00 ` [PATCH 12/21] m68k/scsi: a3000 " Geert Uytterhoeven
2010-04-04 9:00 ` [PATCH 13/21] m68k/scsi: mvme147 - Kill static global mvme147_host Geert Uytterhoeven
2010-04-04 9:00 ` [PATCH 14/21] m68k/scsi: a3000 - Kill static global a3000_host Geert Uytterhoeven
2010-04-04 9:00 ` [PATCH 15/21] m68k/scsi: gvp11 - Extract check_wd33c93() Geert Uytterhoeven
2010-04-04 9:00 ` [PATCH 16/21] m68k/scsi: a2091 - Kill a2091_scsiregs typedef Geert Uytterhoeven
2010-04-04 9:00 ` [PATCH 17/21] m68k/scsi: gvp11 - Kill gvp11_scsiregs typedef Geert Uytterhoeven
2010-04-04 9:00 ` [PATCH 18/21] m68k/scsi: a3000 - Kill a3000_scsiregs typedef Geert Uytterhoeven
2010-04-04 9:00 ` [PATCH 19/21] m68k/scsi: mvme147 - Kill obsolete HOSTS_C logic Geert Uytterhoeven
2010-04-04 9:00 ` [PATCH 20/21] m68k: amiga - A2091/A590 SCSI zorro_driver conversion Geert Uytterhoeven
2010-04-04 9:00 ` [PATCH 21/21] m68k: amiga - GVP Series II " Geert Uytterhoeven
2010-04-05 6:25 ` [PATCH 10/21] m68k/scsi: a2091 - Kill ugly DMA() macro Christoph Hellwig
[not found] ` <20100405062529.GA28950@infradead.org>
2010-04-05 19:42 ` Geert Uytterhoeven
2010-04-23 8:37 ` Geert Uytterhoeven
2010-04-23 8:38 ` Geert Uytterhoeven
2010-04-23 8:40 ` Geert Uytterhoeven
2010-04-23 10:15 ` Ralf Baechle [this message]
2010-04-23 10:26 ` [PATCH] SCSI: sgiwd93: Convert to use shost_priv() Ralf Baechle
2010-05-02 20:05 ` [PATCH 10/21] m68k/scsi: a2091 - Kill ugly DMA() macro James Bottomley
2010-05-03 19:25 ` Geert Uytterhoeven
2010-05-13 19:41 ` Geert Uytterhoeven
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100423101540.GA27244@linux-mips.org \
--to=ralf@linux-mips.org \
--cc=James.Bottomley@suse.de \
--cc=geert@linux-m68k.org \
--cc=hch@infradead.org \
--cc=linux-m68k@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox