From patchwork Wed Sep 20 19:11:34 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 9962157 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 8E4BF60234 for ; Wed, 20 Sep 2017 19:12:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7F8E828B40 for ; Wed, 20 Sep 2017 19:12:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7478629113; Wed, 20 Sep 2017 19:12:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 056AD28B40 for ; Wed, 20 Sep 2017 19:12:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751854AbdITTM5 (ORCPT ); Wed, 20 Sep 2017 15:12:57 -0400 Received: from ec2-52-27-115-49.us-west-2.compute.amazonaws.com ([52.27.115.49]:50298 "EHLO osg.samsung.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751462AbdITTL4 (ORCPT ); Wed, 20 Sep 2017 15:11:56 -0400 Received: from localhost (localhost [127.0.0.1]) by osg.samsung.com (Postfix) with ESMTP id 35815A05F0; Wed, 20 Sep 2017 19:12:24 +0000 (UTC) X-Virus-Scanned: amavisd-new at osg.samsung.com X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" Received: from osg.samsung.com ([127.0.0.1]) by localhost (s-opensource.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id cOj56aKzmPKv; Wed, 20 Sep 2017 19:12:23 +0000 (UTC) Received: from smtp.s-opensource.com (unknown [179.183.111.11]) by osg.samsung.com (Postfix) with ESMTPSA id 0DAB8A0C9D; Wed, 20 Sep 2017 19:12:23 +0000 (UTC) Received: from mchehab by smtp.s-opensource.com with local (Exim 4.89) (envelope-from ) id 1dukPX-000344-Gc; Wed, 20 Sep 2017 16:11:51 -0300 From: Mauro Carvalho Chehab To: Linux Media Mailing List Cc: Mauro Carvalho Chehab , Mauro Carvalho Chehab , Sakari Ailus Subject: [PATCH 09/25] media: dvb_demux.h: add an enum for DMX_TYPE_* and document Date: Wed, 20 Sep 2017 16:11:34 -0300 Message-Id: X-Mailer: git-send-email 2.13.5 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-Virus-Scanned: ClamAV using ClamSMTP 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 --- drivers/media/dvb-core/dvb_demux.h | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/drivers/media/dvb-core/dvb_demux.h b/drivers/media/dvb-core/dvb_demux.h index 6f572ca8d339..6bc4b27dbff3 100644 --- a/drivers/media/dvb-core/dvb_demux.h +++ b/drivers/media/dvb-core/dvb_demux.h @@ -26,9 +26,16 @@ #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;