public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Adrian Bunk <bunk@kernel.org>
To: James.Bottomley@HansenPartnership.com
Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [2.6 patch] scsi/advansys.c: fix compile errors
Date: Wed, 21 May 2008 20:41:52 +0300	[thread overview]
Message-ID: <20080521174152.GF15355@cs181133002.pp.htv.fi> (raw)

This patch fixes the following compile error on architectures not 
providing free_dma():

<--  snip  -->

...
  CC [M]  drivers/scsi/advansys.o
/home/bunk/linux/kernel-2.6/git/linux-2.6/drivers/scsi/advansys.c:71:2: warning: #warning this driver is still not properly converted to the DMA API
/home/bunk/linux/kernel-2.6/git/linux-2.6/drivers/scsi/advansys.c: In function 'advansys_board_found':
/home/bunk/linux/kernel-2.6/git/linux-2.6/drivers/scsi/advansys.c:13876: error: implicit declaration of function 'free_dma'
make[3]: *** [drivers/scsi/advansys.o] Error 1
...
  CC [M]  drivers/scsi/advansys.o
/home/bunk/linux/kernel-2.6/git/linux-2.6/drivers/scsi/advansys.c:71:2: warning: #warning this driver is still not properly converted to the DMA API
/home/bunk/linux/kernel-2.6/git/linux-2.6/drivers/scsi/advansys.c: In function 'advansys_release':
/home/bunk/linux/kernel-2.6/git/linux-2.6/drivers/scsi/advansys.c:13901: error: implicit declaration of function 'free_dma'
make[3]: *** [drivers/scsi/advansys.o] Error 1

<--  snip  -->

Reported-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Adrian Bunk <bunk@kernel.org>

---

 drivers/scsi/advansys.c |    4 ++++
 1 file changed, 4 insertions(+)

539dd76b86cea6a8deffcbfdcc9d4e8343939b6f diff --git a/drivers/scsi/advansys.c b/drivers/scsi/advansys.c
index 8591585..3b41906 100644
--- a/drivers/scsi/advansys.c
+++ b/drivers/scsi/advansys.c
@@ -13872,8 +13872,10 @@ static int __devinit advansys_board_found(struct Scsi_Host *shost,
 	advansys_wide_free_mem(boardp);
 	free_irq(boardp->irq, shost);
  err_free_dma:
+#ifdef CONFIG_ISA
 	if (shost->dma_channel != NO_ISA_DMA)
 		free_dma(shost->dma_channel);
+#endif
  err_free_proc:
 	kfree(boardp->prtbuf);
  err_unmap:
@@ -13894,10 +13896,12 @@ static int advansys_release(struct Scsi_Host *shost)
 	ASC_DBG(1, "begin\n");
 	scsi_remove_host(shost);
 	free_irq(board->irq, shost);
+#ifdef CONFIG_ISA
 	if (shost->dma_channel != NO_ISA_DMA) {
 		ASC_DBG(1, "free_dma()\n");
 		free_dma(shost->dma_channel);
 	}
+#endif
 	if (ASC_NARROW_BOARD(board)) {
 		dma_unmap_single(board->dev,
 					board->dvc_var.asc_dvc_var.overrun_dma,


             reply	other threads:[~2008-05-21 17:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-21 17:41 Adrian Bunk [this message]
2008-05-21 19:53 ` [2.6 patch] scsi/advansys.c: fix compile errors Matthew Wilcox
2008-05-21 20:07   ` Adrian Bunk

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=20080521174152.GF15355@cs181133002.pp.htv.fi \
    --to=bunk@kernel.org \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    /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