Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[media] demux.h: Convert TS filter type into enum

The usage of #define at the kABI is fine, but it doesn't
allow adding a proper description. As those defines deserve
a proper documentation, let's convert them into an enum and
document them at device-drivers DocBook.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>

+16 -20
+16 -20
drivers/media/dvb-core/demux.h
··· 60 60 * TS packet reception 61 61 */ 62 62 63 - /* TS filter type for set() */ 64 - 65 - #define TS_PACKET 1 /* 66 - * send TS packets (188 bytes) to callback 67 - * (default) 68 - */ 69 - 70 - #define TS_PAYLOAD_ONLY 2 /* 71 - * in case TS_PACKET is set, only send the TS 72 - * payload (<=184 bytes per packet) to callback 73 - */ 74 - 75 - #define TS_DECODER 4 /* 76 - * send stream to built-in decoder (if present) 77 - */ 78 - 79 - #define TS_DEMUX 8 /* 80 - * in case TS_PACKET is set, send the TS to 81 - * the demux device, not to the dvr device 82 - */ 63 + /** 64 + * enum ts_filter_type - filter type bitmap for dmx_ts_feed.set() 65 + * 66 + * @TS_PACKET: Send TS packets (188 bytes) to callback (default). 67 + * @TS_PAYLOAD_ONLY: In case TS_PACKET is set, only send the TS payload 68 + * (<=184 bytes per packet) to callback 69 + * @TS_DECODER: Send stream to built-in decoder (if present). 70 + * @TS_DEMUX: In case TS_PACKET is set, send the TS to the demux 71 + * device, not to the dvr device 72 + */ 73 + enum ts_filter_type { 74 + TS_PACKET = 1, 75 + TS_PAYLOAD_ONLY = 2, 76 + TS_DECODER = 4, 77 + TS_DEMUX = 8, 78 + }; 83 79 84 80 /** 85 81 * struct dmx_ts_feed - Structure that contains a TS feed filter