aboutsummaryrefslogtreecommitdiff
path: root/drivers/media/media-entity.c
diff options
context:
space:
mode:
authorHans Verkuil2018-02-05 06:19:00 -0500
committerMauro Carvalho Chehab2018-02-26 10:14:46 -0500
commited3056f015de90a53127d05c34d49fe3e04675a4 (patch)
tree9f68eaedeb28f4b426a512ff36509949a4d3e793 /drivers/media/media-entity.c
parent84694edcae195bd3b0dadd9df176a01ae5912621 (diff)
media: media.h: reorganize header to make it easier to understand
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: Hans Verkuil <hans.verkuil@cisco.com> [mchehab@s-opensource.com: removed lots of spaces before tabs; typo changes ->change ] Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/media-entity.c')
-rw-r--r--drivers/media/media-entity.c16
1 files changed, 0 insertions, 16 deletions
diff --git a/drivers/media/media-entity.c b/drivers/media/media-entity.c
index f7c6d64e6031..3498551e618e 100644
--- a/drivers/media/media-entity.c
+++ b/drivers/media/media-entity.c
@@ -64,22 +64,6 @@ static inline const char *intf_type(struct media_interface *intf)
return "v4l-swradio";
case MEDIA_INTF_T_V4L_TOUCH:
return "v4l-touch";
- case MEDIA_INTF_T_ALSA_PCM_CAPTURE:
- return "alsa-pcm-capture";
- case MEDIA_INTF_T_ALSA_PCM_PLAYBACK:
- return "alsa-pcm-playback";
- case MEDIA_INTF_T_ALSA_CONTROL:
- return "alsa-control";
- case MEDIA_INTF_T_ALSA_COMPRESS:
- return "alsa-compress";
- case MEDIA_INTF_T_ALSA_RAWMIDI:
- return "alsa-rawmidi";
- case MEDIA_INTF_T_ALSA_HWDEP:
- return "alsa-hwdep";
- case MEDIA_INTF_T_ALSA_SEQUENCER:
- return "alsa-sequencer";
- case MEDIA_INTF_T_ALSA_TIMER:
- return "alsa-timer";
default:
return "unknown-intf";
}