diff options
author | Christian Dietrich <christian.dietrich@informatik.uni-erlangen.de> | 2012-06-05 04:23:20 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-06-06 19:36:47 +0200 |
commit | 32a527add871a51b3c06177849d18bf71e33b320 (patch) | |
tree | 98d772addb83ef7219fb30e4384e65cf62536cf5 /drivers/ide/icside.c | |
parent | Merge tag 'please-pull-mce' of git://git.kernel.org/pub/scm/linux/kernel/git/... (diff) | |
download | linux-32a527add871a51b3c06177849d18bf71e33b320.tar.xz linux-32a527add871a51b3c06177849d18bf71e33b320.zip |
ide: icside.c: Fix compile with CONFIG_BLK_DEV_IDEDMA_ICS=n
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>
Diffstat (limited to 'drivers/ide/icside.c')
-rw-r--r-- | drivers/ide/icside.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/ide/icside.c b/drivers/ide/icside.c index 8716066a2f2b..83e5100d73f6 100644 --- a/drivers/ide/icside.c +++ b/drivers/ide/icside.c @@ -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) @@ -456,7 +454,6 @@ err_free: 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, @@ -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) |