• Arnd Bergmann's avatar
    media: omap_vout: use dma_addr_t consistently · 92b7b90c
    Arnd Bergmann authored
    
    
    gcc notices that the driver mixes 'dma_addr_t' 'u8 *' and 'u32'
    to store DMA addresses:
    
    drivers/media/platform/omap/omap_vout.c: In function 'omap_vout_vb2_prepare':
    drivers/media/platform/omap/omap_vout.c:979:37: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
      vout->queued_buf_addr[vb->index] = (u8 *)buf_phy_addr;
                                         ^
    drivers/media/platform/omap/omap_vout.c: In function 'omap_vout_create_video_devices':
    drivers/media/platform/omap/omap_vout.c:1479:21: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
       vout->fbuf.base = (void *)info.paddr;
    
    Use dma_addr_t everywhere here to avoid the type conversions and document
    what the address is used for. Assigning to vout->fbuf.base still requires
    a cast, since that is part of the driver independent data structure.
    Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
    Reviewed-by: Laurent Pinchart <laurent.pinchart@ideaso...
    92b7b90c
omap_vout_vrfb.c 11.1 KB