]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
media: dvb_demux.h: add an enum for DMX_TYPE_* and document
authorMauro Carvalho Chehab <mchehab@s-opensource.com>
Tue, 19 Sep 2017 21:43:49 +0000 (17:43 -0400)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Wed, 11 Oct 2017 17:08:13 +0000 (13:08 -0400)
kernel-doc allows documenting enums. Also, it makes clearer
about the meaning of each field on structures.

So, convert DMX_TYPE_* to an enum.

While here, get rid of the unused DMX_TYPE_PES.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/dvb-core/dvb_demux.h

index 6f572ca8d3393fd4731a10c5d69ffe66026a2e6e..6bc4b27dbff310d44a55383f6f0067914dc43a3a 100644 (file)
 
 #include "demux.h"
 
-#define DMX_TYPE_TS  0
-#define DMX_TYPE_SEC 1
-#define DMX_TYPE_PES 2
+/**
+ * enum dvb_dmx_filter_type - type of demux feed.
+ *
+ * @DMX_TYPE_TS:       feed is in TS mode.
+ * @DMX_TYPE_SEC:      feed is in Section mode.
+ */
+enum dvb_dmx_filter_type {
+       DMX_TYPE_TS,
+       DMX_TYPE_SEC,
+};
 
 #define DMX_STATE_FREE      0
 #define DMX_STATE_ALLOCATED 1
@@ -52,7 +59,7 @@ struct dvb_demux_filter {
        struct dvb_demux_feed *feed;
        int index;
        int state;
-       int type;
+       enum dvb_dmx_filter_type type;
 
        u16 hw_handle;
        struct timer_list timer;
@@ -73,7 +80,7 @@ struct dvb_demux_feed {
 
        struct dvb_demux *demux;
        void *priv;
-       int type;
+       enum dvb_dmx_filter_type type;
        int state;
        u16 pid;