public inbox for linux-m68k@lists.linux-m68k.org
 help / color / mirror / Atom feed
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: Convert to use shost_priv()
Date: Fri, 23 Apr 2010 11:26:54 +0100	[thread overview]
Message-ID: <20100423102654.GA9105@linux-mips.org> (raw)
In-Reply-To: <20100423101540.GA27244@linux-mips.org>

The driver had its own similar macro and still one open-coded reference
to ->hostdata.  Use shost_priv() everywhere for consistency.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
---
Build tested only - I don't have a test system at hand atm.

The previous patch was missing a Signed-off-by: line, feel free to add it.

 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 1b24e8d..e9204fb 100644
--- a/drivers/scsi/sgiwd93.c
+++ b/drivers/scsi/sgiwd93.c
@@ -39,8 +39,6 @@ struct ip22_hostdata {
 	struct hpc3_scsiregs *hregs;
 };
 
-#define host_to_hostdata(host) ((struct ip22_hostdata *)((host)->hostdata))
-
 struct hpc_chunk {
 	struct hpc_dma_desc desc;
 	u32 _padding;	/* align to quadword boundary */
@@ -103,7 +101,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 ip22_hostdata *hdata = shost_priv(cmd->device->host);
 	struct hpc3_scsiregs *hregs = hdata->hregs;
 
 	pr_debug("dma_setup: datainp<%d> hcp<%p> ", datainp, hdata->cpu);
@@ -136,7 +134,7 @@ static int dma_setup(struct scsi_cmnd *cmd, int datainp)
 static void dma_stop(struct Scsi_Host *instance, struct scsi_cmnd *SCpnt,
 		     int status)
 {
-	struct ip22_hostdata *hdata = host_to_hostdata(instance);
+	struct ip22_hostdata *hdata = shost_priv(instance);
 	struct hpc3_scsiregs *hregs = hdata->hregs;
 
 	if (!SCpnt)
@@ -244,7 +242,7 @@ static int __devinit sgiwd93_probe(struct platform_device *pdev)
 
 	host->irq = irq;
 
-	hdata = host_to_hostdata(host);
+	hdata = shost_priv(host);
 	hdata->hregs = hregs;
 	hdata->dev = &pdev->dev;
 	hdata->cpu = dma_alloc_noncoherent(&pdev->dev, HPC_DMA_SIZE,
@@ -298,7 +296,7 @@ out:
 static int __exit sgiwd93_remove(struct platform_device *pdev)
 {
 	struct Scsi_Host *host = platform_get_drvdata(pdev);
-	struct ip22_hostdata *hdata = (struct ip22_hostdata *) host->hostdata;
+	struct ip22_hostdata *hdata = shost_priv(host);
 	struct sgiwd93_platform_data *pd = pdev->dev.platform_data;
 
 	scsi_remove_host(host);

  reply	other threads:[~2010-04-23 10:28 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                               ` [PATCH] SCSI: sgiwd93: remove use of legacy base field of host struct Ralf Baechle
2010-04-23 10:26                                 ` Ralf Baechle [this message]
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=20100423102654.GA9105@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