summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/NCR53c406a.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2014-06-05 23:29:49 +0200
committerChristoph Hellwig <hch@lst.de>2014-07-25 17:16:56 -0400
commit6919a3663a8f12d1c7677fc31e6a57dbd4423a95 (patch)
tree88ec3a3f8bf302e725827b1afd0591742ea1f718 /drivers/scsi/NCR53c406a.c
parentd3814aaf5144b53c4ddebc52b88d12dcee2bfea8 (diff)
downloadlinux-6919a3663a8f12d1c7677fc31e6a57dbd4423a95.tar.gz
linux-6919a3663a8f12d1c7677fc31e6a57dbd4423a95.tar.bz2
linux-6919a3663a8f12d1c7677fc31e6a57dbd4423a95.zip
NCR53c406a: don't call free_dma() by default
The NCR53c406a scsi driver normally does not use DMA, unless the USE_PIO macro is disabled by modifying the source code. The call to free_dma() for some reason uses #ifdef USE_DMA, which does not do the right thing, since USE_DMA is defined as a boolean that is either 0 or 1, but always present. One case where it gets in the way is randconfig builds on ARM, which depending on the configuration does not provide a free_dma() function, causing this build error: drivers/scsi/NCR53c406a.c: In function 'NCR53c406a_release': drivers/scsi/NCR53c406a.c:600:3: error: implicit declaration of function 'free_dma' [-Werror=implicit-function-declaration] free_dma(shost->dma_channel); ^ This changes the code to use #if USE_DMA, to match the rest of the file, which seems to be what the author intended. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Finn Thain <fthain@telegraphics.com.au> Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/scsi/NCR53c406a.c')
-rw-r--r--drivers/scsi/NCR53c406a.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/NCR53c406a.c b/drivers/scsi/NCR53c406a.c
index 10c3374d759f..42c7161474f7 100644
--- a/drivers/scsi/NCR53c406a.c
+++ b/drivers/scsi/NCR53c406a.c
@@ -595,7 +595,7 @@ static int NCR53c406a_release(struct Scsi_Host *shost)
{
if (shost->irq)
free_irq(shost->irq, NULL);
-#ifdef USE_DMA
+#if USE_DMA
if (shost->dma_channel != 0xff)
free_dma(shost->dma_channel);
#endif