linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ide: icside.c: Fix compile with CONFIG_BLK_DEV_IDEDMA_ICS=n
@ 2012-05-29 10:30 Christian Dietrich
  2012-05-29 12:39 ` Sergei Shtylyov
  0 siblings, 1 reply; 10+ messages in thread
From: Christian Dietrich @ 2012-05-29 10:30 UTC (permalink / raw)
  To: David S. Miller; +Cc: linux-ide, linux-kernel, vamos-dev

The icside driver can be configured without DMA support, but it
doesn't compile in this case, 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>
---
 drivers/ide/icside.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

I attach the configuration, that exposes this compilation error. This patch was
*NOT* tested on real hardware. I don't if the fix really does solve the
problem, but at least it is a hint that there is a problem.

diff --git a/drivers/ide/icside.c b/drivers/ide/icside.c
index 8716066..62c59c1 100644
--- a/drivers/ide/icside.c
+++ b/drivers/ide/icside.c
@@ -271,7 +271,7 @@ static void icside_set_dma_mode(ide_hwif_t *hwif, ide_drive_t *drive)
 
 	ide_set_drivedata(drive, (void *)cycle_time);
 
-	printk("%s: %s selected (peak %dMB/s)\n", drive->name,
+	printk("%s: %s selected (peak %ldMB/s)\n", drive->name,
 		ide_xfer_verbose(xfer_mode),
 		2000 / (unsigned long)ide_get_drivedata(drive));
 }
@@ -456,7 +456,9 @@ 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,
+#ifdef CONFIG_BLK_DEV_IDEDMA_ICS
 	.dma_ops		= &icside_v6_dma_ops,
+#endif
 	.host_flags		= IDE_HFLAG_SERIALIZE | IDE_HFLAG_MMIO,
 	.mwdma_mask		= ATA_MWDMA2,
 	.swdma_mask		= ATA_SWDMA2,
@@ -518,10 +520,12 @@ 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
+#endif
 		d.dma_ops = NULL;
 
 	ret = ide_host_register(host, &d, hws);
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2012-06-06 17:37 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-29 10:30 [PATCH] ide: icside.c: Fix compile with CONFIG_BLK_DEV_IDEDMA_ICS=n Christian Dietrich
2012-05-29 12:39 ` Sergei Shtylyov
2012-05-31 10:06   ` Christian Dietrich
2012-06-02 21:12     ` David Miller
2012-06-05 12:23       ` Christian Dietrich
2012-06-06 17:37         ` David Miller
2012-05-31 10:08   ` [PATCH] ide: icside.c: fix printk format string compile warning Christian Dietrich
2012-06-02 21:26     ` Joe Perches
2012-06-05 12:28       ` Christian Dietrich
2012-06-06 17:37         ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).