Skip to content
  • Hans Verkuil's avatar
    media: media.h: reorganize header to make it easier to understand · ed3056f0
    Hans Verkuil authored
    
    
    The media.h public header is very messy. It mixes legacy and 'new' defines
    and it is not easy to figure out what should and what shouldn't be used. It
    also contains confusing comment that are either out of date or completely
    uninteresting for anyone that needs to use this header.
    
    The patch groups all entity functions together, including the 'old' defines
    based on the old range base. The reader just wants to know about the available
    functions and doesn't care about what range is used.
    
    All legacy defines are moved to the end of the header, so it is easier to
    locate them and just ignore them.
    
    The legacy structs in the struct media_entity_desc are put under
    also a much more effective signal to the reader that they shouldn't be used
    compared to the old method of relying on '#if 1' followed by a comment.
    
    The unused MEDIA_INTF_T_ALSA_* defines are also moved to the end of the header
    in the legacy area. They are also dropped from intf_type() in media-entity.c.
    
    All defines are also aligned at the same tab making the header easier to read.
    
    Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
    [mchehab@s-opensource.com: removed lots of spaces before tabs; typo changes ->change ]
    Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
    ed3056f0