Commit 999f3d25 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab

media: dvb_demux.h: add an enum for DMX_STATE_* and document

kernel-doc allows documenting enums. Also, it makes clearer
about the meaning of each field on structures.

So, convert DMX_STATE_* to an enum.

While here, get rid of the unused DMX_STATE_SET.
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent 0463625e
...@@ -37,11 +37,22 @@ enum dvb_dmx_filter_type { ...@@ -37,11 +37,22 @@ enum dvb_dmx_filter_type {
DMX_TYPE_SEC, DMX_TYPE_SEC,
}; };
#define DMX_STATE_FREE 0 /**
#define DMX_STATE_ALLOCATED 1 * enum dvb_dmx_state - state machine for a demux filter.
#define DMX_STATE_SET 2 *
#define DMX_STATE_READY 3 * @DMX_STATE_FREE: indicates that the filter is freed.
#define DMX_STATE_GO 4 * @DMX_STATE_ALLOCATED: indicates that the filter was allocated
* to be used.
* @DMX_STATE_READY: indicates that the filter is ready
* to be used.
* @DMX_STATE_GO: indicates that the filter is running.
*/
enum dvb_dmx_state {
DMX_STATE_FREE,
DMX_STATE_ALLOCATED,
DMX_STATE_READY,
DMX_STATE_GO,
};
#define DVB_DEMUX_MASK_MAX 18 #define DVB_DEMUX_MASK_MAX 18
...@@ -58,7 +69,7 @@ struct dvb_demux_filter { ...@@ -58,7 +69,7 @@ struct dvb_demux_filter {
struct dvb_demux_filter *next; struct dvb_demux_filter *next;
struct dvb_demux_feed *feed; struct dvb_demux_feed *feed;
int index; int index;
int state; enum dvb_dmx_state state;
enum dvb_dmx_filter_type type; enum dvb_dmx_filter_type type;
u16 hw_handle; u16 hw_handle;
...@@ -81,7 +92,7 @@ struct dvb_demux_feed { ...@@ -81,7 +92,7 @@ struct dvb_demux_feed {
struct dvb_demux *demux; struct dvb_demux *demux;
void *priv; void *priv;
enum dvb_dmx_filter_type type; enum dvb_dmx_filter_type type;
int state; enum dvb_dmx_state state;
u16 pid; u16 pid;
ktime_t timeout; ktime_t timeout;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment