lkml.org 
[lkml]   [2008]   [Oct]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[patch 10/18] m68k: Add missing dma_sync_single_range_for_{cpu,device}()
    From: Geert Uytterhoeven <geert@linux-m68k.org>

    | include/linux/ssb/ssb.h: In function 'ssb_dma_sync_single_range_for_cpu':
    | include/linux/ssb/ssb.h:517: error: implicit declaration of function 'dma_sync_single_range_for_cpu'
    | include/linux/ssb/ssb.h: In function 'ssb_dma_sync_single_range_for_device':
    | include/linux/ssb/ssb.h:538: error: implicit declaration of function 'dma_sync_single_range_for_device'

    Add the missing dma_sync_single_range_for_{cpu,device}(), and remove the
    `inline' for the non-static function dma_sync_single_for_device().

    Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
    ---
    arch/m68k/kernel/dma.c | 4 ++--
    include/asm-m68k/dma-mapping.h | 16 ++++++++++++++++
    2 files changed, 18 insertions(+), 2 deletions(-)

    --- a/arch/m68k/kernel/dma.c
    +++ b/arch/m68k/kernel/dma.c
    @@ -66,8 +66,8 @@ void dma_free_coherent(struct device *de
    }
    EXPORT_SYMBOL(dma_free_coherent);

    -inline void dma_sync_single_for_device(struct device *dev, dma_addr_t handle, size_t size,
    - enum dma_data_direction dir)
    +void dma_sync_single_for_device(struct device *dev, dma_addr_t handle,
    + size_t size, enum dma_data_direction dir)
    {
    switch (dir) {
    case DMA_TO_DEVICE:
    --- a/include/asm-m68k/dma-mapping.h
    +++ b/include/asm-m68k/dma-mapping.h
    @@ -74,6 +74,14 @@ extern void dma_sync_single_for_device(s
    extern void dma_sync_sg_for_device(struct device *, struct scatterlist *, int,
    enum dma_data_direction);

    +static inline void dma_sync_single_range_for_device(struct device *dev,
    + dma_addr_t dma_handle, unsigned long offset, size_t size,
    + enum dma_data_direction direction)
    +{
    + /* just sync everything for now */
    + dma_sync_single_for_device(dev, dma_handle, offset + size, direction);
    +}
    +
    static inline void dma_sync_single_for_cpu(struct device *dev, dma_addr_t handle,
    size_t size, enum dma_data_direction dir)
    {
    @@ -84,6 +92,14 @@ static inline void dma_sync_sg_for_cpu(s
    {
    }

    +static inline void dma_sync_single_range_for_cpu(struct device *dev,
    + dma_addr_t dma_handle, unsigned long offset, size_t size,
    + enum dma_data_direction direction)
    +{
    + /* just sync everything for now */
    + dma_sync_single_for_cpu(dev, dma_handle, offset + size, direction);
    +}
    +
    static inline int dma_mapping_error(struct device *dev, dma_addr_t handle)
    {
    return 0;
    --
    Gr{oetje,eeting}s,
    Geert

    --
    Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

    In personal conversations with technical people, I call myself a hacker. But
    when I'm talking to journalists I just say "programmer" or something like that.
    -- Linus Torvalds



    \
     
     \ /
      Last update: 2008-10-13 22:11    [W:0.024 / U:29.692 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site