[PATCH 12/12] staging: COMEDI should depend on HAS_DMA

Ian Abbott abbotti at mev.co.uk
Fri May 10 12:07:42 UTC 2013


On 2013-05-10 11:02, Ian Abbott wrote:
> On 2013-05-09 22:33, H Hartley Sweeten wrote:
>> On Thursday, May 09, 2013 2:05 PM, Geert Uytterhoeven wrote:
>>> If NO_DMA=y:
>>>
>>> ERROR: "dma_free_coherent" [drivers/staging/comedi/comedi.ko] undefined!
>>> ERROR: "dma_alloc_coherent" [drivers/staging/comedi/comedi.ko] undefined!
>>>
>>> Signed-off-by: Geert Uytterhoeven <geert at linux-m68k.org>
>>> Cc: Ian Abbott <abbotti at mev.co.uk>
>>> Cc: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
>>> Cc: devel at driverdev.osuosl.org
>>
>> Grr..
>>
>> The error appears to be caused by the dma alloc/free in comedi_buf.c.
>> These only happen if the (s->async_dma_dir != DMA_NONE). The comedi
>> core defaults the async_dma_dir to DMA_NONE. The only comedi drivers
>> that set it are ni_660x, ni_mio_common, and ni_pcidio.
>>
>> The mite driver also has a dma_alloc/free.
>>
>> Ian, can you think of a better solution than just making comedi depend on HAS_DMA?
>
> The only alternative I can think of is to change comedi_buf.c to only
> compile in the functions if CONFIG_HAS_DMA is defined and to make the
> following config options depend on HAS_DMA:
>
> COMEDI_NI_6527
> COMEDI_NI_65XX
> COMEDI_NI_660X
> COMEDI_NI_670X
> COMEDI_NI_LABPC_PCI
> COMEDI_NI_PCIDIO
> COMEDI_NI_PCIMIO
> COMEDI_MITE
> COMEDI_NI_TIOCMD

I'm working on it.

-- 
-=( Ian Abbott @ MEV Ltd.    E-mail: <abbotti at mev.co.uk>        )=-
-=( Tel: +44 (0)161 477 1898   FAX: +44 (0)161 718 3587         )=-



More information about the devel mailing list