]> git.baikalelectronics.ru Git - kernel.git/commit
libata: Protect DMA core code by #ifdef CONFIG_HAS_DMA
authorGeert Uytterhoeven <geert@linux-m68k.org>
Tue, 3 Jan 2017 18:09:49 +0000 (19:09 +0100)
committerTejun Heo <tj@kernel.org>
Fri, 6 Jan 2017 16:32:44 +0000 (11:32 -0500)
commite925fa92842529424fd91d9e3041df7de4ced5c0
tree1f0157a5837d36d047311e1bab03b7732b965107
parent21d820098cf7e0c70417161056cfea5c0c8f636d
libata: Protect DMA core code by #ifdef CONFIG_HAS_DMA

If NO_DMA=y:

    ERROR: "bad_dma_ops" [drivers/ata/libata.ko] undefined!

To fix this, protect the DMA code by #ifdef CONFIG_HAS_DMA, and provide
dummies of ata_sg_clean() and ata_sg_setup() for the !CONFIG_HAS_DMA
case.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Tejun Heo <tj@kernel.org>
drivers/ata/libata-core.c