From patchwork Sat Oct 10 13:36:06 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: 7366441 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 B008A9F32B for ; Sat, 10 Oct 2015 13:37:01 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E6F57206E0 for ; Sat, 10 Oct 2015 13:37:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 13CE0206C3 for ; Sat, 10 Oct 2015 13:37:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752148AbbJJNg4 (ORCPT ); Sat, 10 Oct 2015 09:36:56 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:39210 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751966AbbJJNgS (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-0003Bu-V5; 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-0003ll-PM; Sat, 10 Oct 2015 10:36:10 -0300 From: Mauro Carvalho Chehab To: Linux Media Mailing List Cc: Mauro Carvalho Chehab Subject: [PATCH 23/26] [media] demux.h: Convert TS filter type into enum Date: Sat, 10 Oct 2015 10:36:06 -0300 Message-Id: <0e6f2d1533bdd1ea08a15648e35ff4f8e0fcc612.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 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 diff --git a/drivers/media/dvb-core/demux.h b/drivers/media/dvb-core/demux.h index 576e30fc5c18..98bff5cc4ff4 100644 --- a/drivers/media/dvb-core/demux.h +++ b/drivers/media/dvb-core/demux.h @@ -60,26 +60,22 @@ * TS packet reception */ -/* TS filter type for set() */ - -#define TS_PACKET 1 /* - * send TS packets (188 bytes) to callback - * (default) - */ - -#define TS_PAYLOAD_ONLY 2 /* - * in case TS_PACKET is set, only send the TS - * payload (<=184 bytes per packet) to callback - */ - -#define TS_DECODER 4 /* - * send stream to built-in decoder (if present) - */ - -#define TS_DEMUX 8 /* - * in case TS_PACKET is set, send the TS to - * the demux device, not to the dvr device - */ +/** + * enum ts_filter_type - filter type bitmap for dmx_ts_feed.set() + * + * @TS_PACKET: Send TS packets (188 bytes) to callback (default). + * @TS_PAYLOAD_ONLY: In case TS_PACKET is set, only send the TS payload + * (<=184 bytes per packet) to callback + * @TS_DECODER: Send stream to built-in decoder (if present). + * @TS_DEMUX: In case TS_PACKET is set, send the TS to the demux + * device, not to the dvr device + */ +enum ts_filter_type { + TS_PACKET = 1, + TS_PAYLOAD_ONLY = 2, + TS_DECODER = 4, + TS_DEMUX = 8, +}; /** * struct dmx_ts_feed - Structure that contains a TS feed filter