From patchwork Sat Oct 10 13:36:07 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 7366571 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 993789F32B for ; Sat, 10 Oct 2015 13:37:44 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B622C206E0 for ; Sat, 10 Oct 2015 13:37:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DD0F2206BA for ; Sat, 10 Oct 2015 13:37:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752147AbbJJNg4 (ORCPT ); Sat, 10 Oct 2015 09:36:56 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:39205 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751965AbbJJNgS (ORCPT ); Sat, 10 Oct 2015 09:36:18 -0400 Received: from [179.183.104.18] (helo=smtp.w2.samsung.com) by bombadil.infradead.org with esmtpsa (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZkuJt-0003Bx-UK; Sat, 10 Oct 2015 13:36:18 +0000 Received: from mchehab by smtp.w2.samsung.com with local (Exim 4.85) (envelope-from ) id 1ZkuJm-0003lp-Pt; Sat, 10 Oct 2015 10:36:10 -0300 From: Mauro Carvalho Chehab To: Linux Media Mailing List Cc: Mauro Carvalho Chehab Subject: [PATCH 24/26] [media] demux.h: Convert MPEG-TS demux caps to an enum Date: Sat, 10 Oct 2015 10:36:07 -0300 Message-Id: <9be91db2efcf749eb159c674915d38e5ac14682a.1444483819.git.mchehab@osg.samsung.com> X-Mailer: git-send-email 2.4.3 In-Reply-To: References: In-Reply-To: References: Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 diff --git a/drivers/media/dvb-core/demux.h b/drivers/media/dvb-core/demux.h index 98bff5cc4ff4..ccc1f43cb9a9 100644 --- a/drivers/media/dvb-core/demux.h +++ b/drivers/media/dvb-core/demux.h @@ -332,16 +332,20 @@ struct dmx_frontend { * MPEG-2 TS Demux */ -/* - * Flags OR'ed in the capabilities field of struct dmx_demux. +/** + * enum dmx_demux_caps - MPEG-2 TS Demux capabilities bitmap + * + * @DMX_TS_FILTERING: set if TS filtering is supported; + * @DMX_SECTION_FILTERING: set if section filtering is supported; + * @DMX_MEMORY_BASED_FILTERING: set if write() available. + * + * Those flags are OR'ed in the &dmx_demux.&capabilities field */ - -#define DMX_TS_FILTERING 1 -#define DMX_PES_FILTERING 2 -#define DMX_SECTION_FILTERING 4 -#define DMX_MEMORY_BASED_FILTERING 8 /* write() available */ -#define DMX_CRC_CHECKING 16 -#define DMX_TS_DESCRAMBLING 32 +enum dmx_demux_caps { + DMX_TS_FILTERING = 1, + DMX_SECTION_FILTERING = 4, + DMX_MEMORY_BASED_FILTERING = 8, +}; /* * Demux resource type identifier. @@ -361,7 +365,7 @@ struct dmx_frontend { * struct dmx_demux - Structure that contains the demux capabilities and * callbacks. * - * @capabilities: Bitfield of capability flags + * @capabilities: Bitfield of capability flags. * * @frontend: Front-end connected to the demux * @@ -549,7 +553,7 @@ struct dmx_frontend { */ struct dmx_demux { - u32 capabilities; + enum dmx_demux_caps capabilities; struct dmx_frontend *frontend; void *priv; int (*open)(struct dmx_demux *demux);