[PATCH] SCSI: sgiwd93: Convert to use shost_priv()

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

 



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@xxxxxxxxxxxxxx>
---
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);
--
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