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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Apr 24, 2015 at 09:15:00AM +0200, Geert Uytterhoeven wrote:
> On Thu, Apr 23, 2015 at 9:17 PM, Greg Kroah-Hartman
> <gregkh@xxxxxxxxxxxxxxxxxxx> wrote:
> > 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.
> 
> Alternatively, I can stick in one more #ifdef, to no longer rely on the compiler
> optimization?

That would be better.

thanks,

greg k-h
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux