advansys fix on ISA-less configs
The code if (shost->dma_channel != NO_ISA_DMA) free_dma(shost->dma_channel); in there is triggerable only if we have CONFIG_ISA (we only set ->dma_channel to something other than NO_ISA_DMA under #ifdef CONFIG_ISA). OTOH, free_dma() is not guaranteed to be there in absense of CONFIG_ISA. IOW, driver runs into undefined symbols on PCI-but-not-ISA configs (e.g. on frv) and it's a false positive. Fix: put the entire if () under #ifdef CONFIG_ISA; behaviour doesn't change and dependency on free_dma() disappears for !CONFIG_ISA. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
2fceab0bd8
commit
30037818f7
|
@ -13872,8 +13872,10 @@ static int __devinit advansys_board_found(struct Scsi_Host *shost,
|
||||||
advansys_wide_free_mem(boardp);
|
advansys_wide_free_mem(boardp);
|
||||||
free_irq(boardp->irq, shost);
|
free_irq(boardp->irq, shost);
|
||||||
err_free_dma:
|
err_free_dma:
|
||||||
|
#ifdef CONFIG_ISA
|
||||||
if (shost->dma_channel != NO_ISA_DMA)
|
if (shost->dma_channel != NO_ISA_DMA)
|
||||||
free_dma(shost->dma_channel);
|
free_dma(shost->dma_channel);
|
||||||
|
#endif
|
||||||
err_free_proc:
|
err_free_proc:
|
||||||
kfree(boardp->prtbuf);
|
kfree(boardp->prtbuf);
|
||||||
err_unmap:
|
err_unmap:
|
||||||
|
@ -13894,10 +13896,12 @@ static int advansys_release(struct Scsi_Host *shost)
|
||||||
ASC_DBG(1, "begin\n");
|
ASC_DBG(1, "begin\n");
|
||||||
scsi_remove_host(shost);
|
scsi_remove_host(shost);
|
||||||
free_irq(board->irq, shost);
|
free_irq(board->irq, shost);
|
||||||
|
#ifdef CONFIG_ISA
|
||||||
if (shost->dma_channel != NO_ISA_DMA) {
|
if (shost->dma_channel != NO_ISA_DMA) {
|
||||||
ASC_DBG(1, "free_dma()\n");
|
ASC_DBG(1, "free_dma()\n");
|
||||||
free_dma(shost->dma_channel);
|
free_dma(shost->dma_channel);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
if (ASC_NARROW_BOARD(board)) {
|
if (ASC_NARROW_BOARD(board)) {
|
||||||
dma_unmap_single(board->dev,
|
dma_unmap_single(board->dev,
|
||||||
board->dvc_var.asc_dvc_var.overrun_dma,
|
board->dvc_var.asc_dvc_var.overrun_dma,
|
||||||
|
|
Loading…
Reference in New Issue