Skip to content

Commit

Permalink
ide: icside.c: Fix compile with CONFIG_BLK_DEV_IDEDMA_ICS=n
Browse files Browse the repository at this point in the history
The icside driver can be configured without DMA support, but it
doesn't compile then, because DMA operations are referenced.

drivers/ide/icside.c:523: error: 'icside_v6_port_ops' undeclared
drivers/ide/icside.c:522: error: 'icside_dma_init' undeclared

Signed-off-by: Christian Dietrich<christian.dietrich@informatik.uni-erlangen.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Christian Dietrich authored and David S. Miller committed Jun 6, 2012
1 parent eea5b55 commit 32a527a
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions drivers/ide/icside.c
Original file line number Diff line number Diff line change
Expand Up @@ -375,8 +375,6 @@ static const struct ide_dma_ops icside_v6_dma_ops = {
.dma_test_irq = icside_dma_test_irq,
.dma_lost_irq = ide_dma_lost_irq,
};
#else
#define icside_v6_dma_ops NULL
#endif

static int icside_dma_off_init(ide_hwif_t *hwif, const struct ide_port_info *d)
Expand Down Expand Up @@ -456,7 +454,6 @@ icside_register_v5(struct icside_state *state, struct expansion_card *ec)
static const struct ide_port_info icside_v6_port_info __initdata = {
.init_dma = icside_dma_off_init,
.port_ops = &icside_v6_no_dma_port_ops,
.dma_ops = &icside_v6_dma_ops,
.host_flags = IDE_HFLAG_SERIALIZE | IDE_HFLAG_MMIO,
.mwdma_mask = ATA_MWDMA2,
.swdma_mask = ATA_SWDMA2,
Expand Down Expand Up @@ -518,11 +515,13 @@ icside_register_v6(struct icside_state *state, struct expansion_card *ec)

ecard_set_drvdata(ec, state);

#ifdef CONFIG_BLK_DEV_IDEDMA_ICS
if (ec->dma != NO_DMA && !request_dma(ec->dma, DRV_NAME)) {
d.init_dma = icside_dma_init;
d.port_ops = &icside_v6_port_ops;
} else
d.dma_ops = NULL;
d.dma_ops = &icside_v6_dma_ops;
}
#endif

ret = ide_host_register(host, &d, hws);
if (ret)
Expand Down

0 comments on commit 32a527a

Please sign in to comment.