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

[media] demux.h: Convert MPEG-TS demux caps to an enum

While we can't document #defines, documenting enums are
well supported by kernel-doc. So, convert the bitmap defines
into an enum.

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

+15 -11
+15 -11
drivers/media/dvb-core/demux.h
··· 332 332 * MPEG-2 TS Demux 333 333 */ 334 334 335 - /* 336 - * Flags OR'ed in the capabilities field of struct dmx_demux. 335 + /** 336 + * enum dmx_demux_caps - MPEG-2 TS Demux capabilities bitmap 337 + * 338 + * @DMX_TS_FILTERING: set if TS filtering is supported; 339 + * @DMX_SECTION_FILTERING: set if section filtering is supported; 340 + * @DMX_MEMORY_BASED_FILTERING: set if write() available. 341 + * 342 + * Those flags are OR'ed in the &dmx_demux.&capabilities field 337 343 */ 338 - 339 - #define DMX_TS_FILTERING 1 340 - #define DMX_PES_FILTERING 2 341 - #define DMX_SECTION_FILTERING 4 342 - #define DMX_MEMORY_BASED_FILTERING 8 /* write() available */ 343 - #define DMX_CRC_CHECKING 16 344 - #define DMX_TS_DESCRAMBLING 32 344 + enum dmx_demux_caps { 345 + DMX_TS_FILTERING = 1, 346 + DMX_SECTION_FILTERING = 4, 347 + DMX_MEMORY_BASED_FILTERING = 8, 348 + }; 345 349 346 350 /* 347 351 * Demux resource type identifier. ··· 365 361 * struct dmx_demux - Structure that contains the demux capabilities and 366 362 * callbacks. 367 363 * 368 - * @capabilities: Bitfield of capability flags 364 + * @capabilities: Bitfield of capability flags. 369 365 * 370 366 * @frontend: Front-end connected to the demux 371 367 * ··· 553 549 */ 554 550 555 551 struct dmx_demux { 556 - u32 capabilities; 552 + enum dmx_demux_caps capabilities; 557 553 struct dmx_frontend *frontend; 558 554 void *priv; 559 555 int (*open)(struct dmx_demux *demux);