Skip to content

Commit ce19566

Browse files
geertuJames Bottomley
authored andcommitted
[SCSI] mvme147: Use shost_priv() and kill ugly HDATA() macro
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
1 parent 52c3d8a commit ce19566

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

‎drivers/scsi/mvme147.c‎

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@
1616
#include <linux/stat.h>
1717

1818

19-
#define HDATA(ptr) ((struct WD33C93_hostdata *)((ptr)->hostdata))
20-
2119
static struct Scsi_Host *mvme147_host = NULL;
2220

2321
static irqreturn_t mvme147_intr(int irq, void *dummy)
@@ -31,6 +29,7 @@ static irqreturn_t mvme147_intr(int irq, void *dummy)
3129

3230
static int dma_setup(struct scsi_cmnd *cmd, int dir_in)
3331
{
32+
struct WD33C93_hostdata *hdata = shost_priv(mvme147_host);
3433
unsigned char flags = 0x01;
3534
unsigned long addr = virt_to_bus(cmd->SCp.ptr);
3635

@@ -39,7 +38,7 @@ static int dma_setup(struct scsi_cmnd *cmd, int dir_in)
3938
flags |= 0x04;
4039

4140
/* remember direction */
42-
HDATA(mvme147_host)->dma_dir = dir_in;
41+
hdata->dma_dir = dir_in;
4342

4443
if (dir_in) {
4544
/* invalidate any cache */
@@ -68,6 +67,7 @@ int mvme147_detect(struct scsi_host_template *tpnt)
6867
{
6968
static unsigned char called = 0;
7069
wd33c93_regs regs;
70+
struct WD33C93_hostdata *hdata;
7171

7272
if (!MACH_IS_MVME147 || called)
7373
return 0;
@@ -84,9 +84,10 @@ int mvme147_detect(struct scsi_host_template *tpnt)
8484
mvme147_host->irq = MVME147_IRQ_SCSI_PORT;
8585
regs.SASR = (volatile unsigned char *)0xfffe4000;
8686
regs.SCMD = (volatile unsigned char *)0xfffe4001;
87-
HDATA(mvme147_host)->no_sync = 0xff;
88-
HDATA(mvme147_host)->fast = 0;
89-
HDATA(mvme147_host)->dma_mode = CTRL_DMA;
87+
hdata = shost_priv(mvme147_host);
88+
hdata->no_sync = 0xff;
89+
hdata->fast = 0;
90+
hdata->dma_mode = CTRL_DMA;
9091
wd33c93_init(mvme147_host, regs, dma_setup, dma_stop, WD33C93_FS_8_10);
9192

9293
if (request_irq(MVME147_IRQ_SCSI_PORT, mvme147_intr, 0,

0 commit comments

Comments
 (0)