Re: [PATCH v2] staging: fbtft: Disable DMA support if DMA is not available

From: Greg Kroah-Hartman
Date: Thu Apr 23 2015 - 15:17:51 EST


On Thu, Apr 23, 2015 at 08:47:15PM +0200, Geert Uytterhoeven wrote:
> 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.
>
> If !HAS_DMA, "dma" will always be false, and the compiler will optimize
> away the call to dmam_alloc_coherent().

Oh that's "sneaky" and not good, let's just make this driver be
dependant on DMA and be done with it. I don't like to rely on the
optimizer to get things to work properly.

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/