lkml.org 
[lkml]   [2014]   [Dec]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] i2c: sh_mobile: I2C_SH_MOBILE should depend on HAS_DMA
On Wed, Dec 17, 2014 at 09:04:52AM +0100, Geert Uytterhoeven wrote:
> Hi Wolfram,
>
> On Wed, Dec 17, 2014 at 7:58 AM, Wolfram Sang <wsa@the-dreams.de> wrote:
> > On Mon, Dec 15, 2014 at 02:37:04PM +0100, Geert Uytterhoeven wrote:
> >> If NO_DMA=y:
> >>
> >> drivers/built-in.o: In function `sh_mobile_i2c_dma_unmap':
> >> i2c-sh_mobile.c:(.text+0x60de42): undefined reference to `dma_unmap_single'
> >> drivers/built-in.o: In function `sh_mobile_i2c_xfer_dma':
> >> i2c-sh_mobile.c:(.text+0x60df22): undefined reference to `dma_map_single'
> >> i2c-sh_mobile.c:(.text+0x60df2e): undefined reference to `dma_mapping_error'
> >>
> >> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
> >
> > Thanks for spotting this. However, since DMA is opt-in, isn't this
> > dependency too much? I can't think of anything better than #ifdeffing
> > the code, though.
>
> You're right.
>
> E.g. drivers/spi/spi.c (in SPI the mapping is handled by the core), this
> code is #ifdefed out.

Then again, we could depend on ARM || SUPERH || (COMPILE_TEST &&
HAS_DMA) to skip the #ifdeffery? ARM and SUPERH don't have NO_DMA.

[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2014-12-17 10:21    [W:0.042 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site