summaryrefslogtreecommitdiffstats
path: root/drivers/staging/fbtft
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert@linux-m68k.org>2015-04-24 09:44:15 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-04-30 16:51:21 +0200
commit8e1a4c7f718e5de5019cb5ce6ada657ce1b5ea89 (patch)
tree76ef68c2905bbdd2573a6944b62adfb08b9bd417 /drivers/staging/fbtft
parenta94ac1590b28245225300aaca7ea2de4f3f1e296 (diff)
downloadblackbird-obmc-linux-8e1a4c7f718e5de5019cb5ce6ada657ce1b5ea89.tar.gz
blackbird-obmc-linux-8e1a4c7f718e5de5019cb5ce6ada657ce1b5ea89.zip
staging: fbtft: Disable DMA support if DMA is not available
If NO_DMA=y: drivers/built-in.o: In function `fbtft_framebuffer_alloc': (.text+0xb53cae): undefined reference to `dmam_alloc_coherent' As DMA support is already optional, make it depend on HAS_DMA. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/fbtft')
-rw-r--r--drivers/staging/fbtft/fbtft-core.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/staging/fbtft/fbtft-core.c b/drivers/staging/fbtft/fbtft-core.c
index 53b748be2712..ce645213a539 100644
--- a/drivers/staging/fbtft/fbtft-core.c
+++ b/drivers/staging/fbtft/fbtft-core.c
@@ -47,9 +47,11 @@ static unsigned long debug;
module_param(debug, ulong, 0);
MODULE_PARM_DESC(debug, "override device debug level");
+#ifdef CONFIG_HAS_DMA
static bool dma = true;
module_param(dma, bool, 0);
MODULE_PARM_DESC(dma, "Use DMA buffer");
+#endif
void fbtft_dbg_hex(const struct device *dev, int groupsize,
@@ -856,10 +858,13 @@ struct fb_info *fbtft_framebuffer_alloc(struct fbtft_display *display,
#endif
if (txbuflen > 0) {
+#ifdef CONFIG_HAS_DMA
if (dma) {
dev->coherent_dma_mask = ~0;
txbuf = dmam_alloc_coherent(dev, txbuflen, &par->txbuf.dma, GFP_DMA);
- } else {
+ } else
+#endif
+ {
txbuf = devm_kzalloc(par->info->device, txbuflen, GFP_KERNEL);
}
if (!txbuf)
OpenPOWER on IntegriCloud