mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Christian Dietrich <christian.dietrich@informatik.uni-erlangen.de>
To: David Miller <davem@davemloft.net>
Cc: sshtylyov@mvista.com,
	christian.dietrich@informatik.uni-erlangen.de,
	linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org,
	vamos-dev@lists.cs.fau.de
Subject: Re: [PATCH] ide: icside.c: Fix compile with CONFIG_BLK_DEV_IDEDMA_ICS=n
Date: Tue, 05 Jun 2012 14:23:20 +0200	[thread overview]
Message-ID: <864nqq3q2v.fsf@gandalf.zerties.org> (raw)
In-Reply-To: <20120602.171210.1245211360510437081.davem@davemloft.net> (David Miller's message of "Sat, 02 Jun 2012 17:12:10 -0400 (EDT)")

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>
---
 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 8716066..83e5100 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)
-- 
1.7.5.4


  reply	other threads:[~2012-06-05 12:23 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-29 10:30 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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=864nqq3q2v.fsf@gandalf.zerties.org \
    --to=christian.dietrich@informatik.uni-erlangen.de \
    --cc=davem@davemloft.net \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sshtylyov@mvista.com \
    --cc=vamos-dev@lists.cs.fau.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®