From patchwork Mon Nov 16 19:53:52 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 7630481 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 8C6329F2EC for ; Mon, 16 Nov 2015 19:54:21 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BB8E02058A for ; Mon, 16 Nov 2015 19:54:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D9F8B2058C for ; Mon, 16 Nov 2015 19:54:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752159AbbKPTyQ (ORCPT ); Mon, 16 Nov 2015 14:54:16 -0500 Received: from mail-wm0-f50.google.com ([74.125.82.50]:37112 "EHLO mail-wm0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751934AbbKPTyN (ORCPT ); Mon, 16 Nov 2015 14:54:13 -0500 Received: by wmww144 with SMTP id w144so135112132wmw.0 for ; Mon, 16 Nov 2015 11:54:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:subject:to:cc:message-id:date:user-agent:mime-version :content-type:content-transfer-encoding; bh=h6lnWkA7eRJRZnwYVR5F480jmN9c3ybQJ2TFfuAc1vU=; b=to6YHHFAT1CUaDP4jcEV+Ox8cVNGjEm8unyu48wfFcTyhD04R3P+oqsleq8qH+L4uQ IrSTgn85LDO7B1TqlPhV9LG7bhoZeAaPkBnlH/c2BOuOB8iO3jvQmuP+KKDHSdJ5LBbv ajymrf3hGfEsQZ8wp+U5NUxqNX0zbfdGnmiEMBQa+DWL1hV/eCE/FoVz52SbS4HpaBqZ LpcZ7mq5OVUkPpxAAf9f44O68Nw97tZppVl3DghxGo2Q2/TWBcEYv/KSoFk8i1EcNkF4 ZCxP2pE2HwjOAyIky2Uu4vFnW/l7JQmhSc80VEEqsuPAOsuq5O2+Rij4/rkL9eGgLDmd getg== X-Received: by 10.194.133.233 with SMTP id pf9mr43263093wjb.71.1447703652188; Mon, 16 Nov 2015 11:54:12 -0800 (PST) Received: from ?IPv6:2003:62:5f55:ba00:2914:ea82:f3d7:fe39? (p200300625F55BA002914EA82F3D7FE39.dip0.t-ipconnect.de. [2003:62:5f55:ba00:2914:ea82:f3d7:fe39]) by smtp.googlemail.com with ESMTPSA id z17sm17975626wjq.1.2015.11.16.11.54.11 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 16 Nov 2015 11:54:11 -0800 (PST) From: Heiner Kallweit Subject: [PATCH 8/8] media: rc: define RC_BIT_ALL as ~0 To: Mauro Carvalho Chehab Cc: linux-media@vger.kernel.org, =?UTF-8?Q?David_H=c3=a4rdeman?= Message-ID: <564A3450.4040800@gmail.com> Date: Mon, 16 Nov 2015 20:53:52 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, 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 RC_BIT_ALL explicitely lists each single currently defined protocol bit. To simplify the code and make adding a protocol easier set each bit no matter whether the respective protocol is defined yet. RC_BIT_ALL is only used in checks whether a particular protocol is allowed therefore it has no impact if bits for not (yet) defined protocols are set. Signed-off-by: Heiner Kallweit --- drivers/media/rc/rc-main.c | 1 - include/media/rc-map.h | 10 +--------- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/drivers/media/rc/rc-main.c b/drivers/media/rc/rc-main.c index d1611f1..d7055e1 100644 --- a/drivers/media/rc/rc-main.c +++ b/drivers/media/rc/rc-main.c @@ -1447,7 +1447,6 @@ int rc_register_device(struct rc_dev *dev) kfree(path); if (dev->driver_type == RC_DRIVER_IR_RAW) { - dev->allowed_protocols |= RC_BIT_LIRC; /* calls ir_register_device so unlock mutex here*/ mutex_unlock(&dev->lock); rc = ir_raw_event_register(dev); diff --git a/include/media/rc-map.h b/include/media/rc-map.h index 7844e98..27aaf6b 100644 --- a/include/media/rc-map.h +++ b/include/media/rc-map.h @@ -54,15 +54,7 @@ enum rc_type { #define RC_BIT_SHARP (1ULL << RC_TYPE_SHARP) #define RC_BIT_XMP (1ULL << RC_TYPE_XMP) -#define RC_BIT_ALL (RC_BIT_UNKNOWN | RC_BIT_OTHER | \ - RC_BIT_RC5 | RC_BIT_RC5X | RC_BIT_RC5_SZ | \ - RC_BIT_JVC | \ - RC_BIT_SONY12 | RC_BIT_SONY15 | RC_BIT_SONY20 | \ - RC_BIT_NEC | RC_BIT_SANYO | RC_BIT_MCE_KBD | \ - RC_BIT_RC6_0 | RC_BIT_RC6_6A_20 | RC_BIT_RC6_6A_24 | \ - RC_BIT_RC6_6A_32 | RC_BIT_RC6_MCE | RC_BIT_SHARP | \ - RC_BIT_XMP) - +#define RC_BIT_ALL ~RC_BIT_NONE #define RC_SCANCODE_UNKNOWN(x) (x) #define RC_SCANCODE_OTHER(x) (x)