From patchwork Thu Apr 3 23:32:26 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?RGF2aWQgSMODwqRyZGVtYW4=?= X-Patchwork-Id: 3934791 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 50713BFF02 for ; Thu, 3 Apr 2014 23:32:34 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 57D6C20303 for ; Thu, 3 Apr 2014 23:32:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5DE9320320 for ; Thu, 3 Apr 2014 23:32:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753992AbaDCXc3 (ORCPT ); Thu, 3 Apr 2014 19:32:29 -0400 Received: from hardeman.nu ([95.142.160.32]:40290 "EHLO hardeman.nu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753803AbaDCXc2 (ORCPT ); Thu, 3 Apr 2014 19:32:28 -0400 Received: from zeus.hardeman.nu (unknown [IPv6:2001:a60:16f7:7000:b8ab:ce09:22ee:d164]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by vader.hardeman.nu (Postfix) with ESMTPSA id DF6C7253; Fri, 4 Apr 2014 01:32:26 +0200 (CEST) Received: by zeus.hardeman.nu (Postfix, from userid 1000) id 7D887C600FA; Fri, 4 Apr 2014 01:32:26 +0200 (CEST) Subject: [PATCH 14/49] rc-core: rename dev->scanmask to dev->scancode_mask From: David =?utf-8?b?SMOkcmRlbWFu?= To: linux-media@vger.kernel.org Cc: m.chehab@samsung.com Date: Fri, 04 Apr 2014 01:32:26 +0200 Message-ID: <20140403233226.27099.88029.stgit@zeus.muc.hardeman.nu> In-Reply-To: <20140403232420.27099.94872.stgit@zeus.muc.hardeman.nu> References: <20140403232420.27099.94872.stgit@zeus.muc.hardeman.nu> User-Agent: StGit/0.17.1-dirty 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.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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 We already have dev->scancode_filter and dev->scancode_wakeup_filter so rename dev->scanmask to dev->scancode_mask for consistency. Signed-off-by: David Härdeman --- drivers/media/pci/cx88/cx88-input.c | 2 +- drivers/media/pci/ttpci/budget-ci.c | 2 +- drivers/media/rc/rc-main.c | 4 ++-- drivers/media/usb/cx231xx/cx231xx-input.c | 2 +- drivers/media/usb/tm6000/tm6000-input.c | 2 +- include/media/rc-core.h | 5 +++-- 6 files changed, 9 insertions(+), 8 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/media/pci/cx88/cx88-input.c b/drivers/media/pci/cx88/cx88-input.c index 93ff6a7..3f1342c 100644 --- a/drivers/media/pci/cx88/cx88-input.c +++ b/drivers/media/pci/cx88/cx88-input.c @@ -478,7 +478,7 @@ int cx88_ir_init(struct cx88_core *core, struct pci_dev *pci) dev->priv = core; dev->open = cx88_ir_open; dev->close = cx88_ir_close; - dev->scanmask = hardware_mask; + dev->scancode_mask = hardware_mask; if (ir->sampling) { dev->driver_type = RC_DRIVER_IR_RAW; diff --git a/drivers/media/pci/ttpci/budget-ci.c b/drivers/media/pci/ttpci/budget-ci.c index 41ce7de..1feeeff 100644 --- a/drivers/media/pci/ttpci/budget-ci.c +++ b/drivers/media/pci/ttpci/budget-ci.c @@ -234,7 +234,7 @@ static int msp430_ir_init(struct budget_ci *budget_ci) break; } if (!budget_ci->ir.full_rc5) - dev->scanmask = 0xff; + dev->scancode_mask = 0xff; error = rc_register_device(dev); if (error) { diff --git a/drivers/media/rc/rc-main.c b/drivers/media/rc/rc-main.c index 287191b..2788102 100644 --- a/drivers/media/rc/rc-main.c +++ b/drivers/media/rc/rc-main.c @@ -287,8 +287,8 @@ static unsigned int ir_establish_scancode(struct rc_dev *dev, * IR tables from other remotes. So, we support specifying a mask to * indicate the valid bits of the scancodes. */ - if (dev->scanmask) - entry->scancode &= dev->scanmask; + if (dev->scancode_mask) + entry->scancode &= dev->scancode_mask; /* * First check if we already have a mapping for this command. diff --git a/drivers/media/usb/cx231xx/cx231xx-input.c b/drivers/media/usb/cx231xx/cx231xx-input.c index adcdd92..05f0434 100644 --- a/drivers/media/usb/cx231xx/cx231xx-input.c +++ b/drivers/media/usb/cx231xx/cx231xx-input.c @@ -91,7 +91,7 @@ int cx231xx_ir_init(struct cx231xx *dev) dev->init_data.get_key = get_key_isdbt; dev->init_data.ir_codes = cx231xx_boards[dev->model].rc_map_name; /* The i2c micro-controller only outputs the cmd part of NEC protocol */ - dev->init_data.rc_dev->scanmask = 0xff; + dev->init_data.rc_dev->scancode_mask = 0xff; dev->init_data.rc_dev->driver_name = "cx231xx"; dev->init_data.type = RC_BIT_NEC; info.addr = 0x30; diff --git a/drivers/media/usb/tm6000/tm6000-input.c b/drivers/media/usb/tm6000/tm6000-input.c index 8a519f5..26b2ebb 100644 --- a/drivers/media/usb/tm6000/tm6000-input.c +++ b/drivers/media/usb/tm6000/tm6000-input.c @@ -443,7 +443,7 @@ int tm6000_ir_init(struct tm6000_core *dev) /* input setup */ rc->allowed_protocols = RC_BIT_RC5 | RC_BIT_NEC; /* Neded, in order to support NEC remotes with 24 or 32 bits */ - rc->scanmask = 0xffff; + rc->scancode_mask = 0xffff; rc->priv = ir; rc->change_protocol = tm6000_ir_change_protocol; if (dev->int_in.endp) { diff --git a/include/media/rc-core.h b/include/media/rc-core.h index e6784e8..5a082e7 100644 --- a/include/media/rc-core.h +++ b/include/media/rc-core.h @@ -98,11 +98,12 @@ enum rc_filter_type { * @enabled_wakeup_protocols: bitmask with the enabled RC_BIT_* wakeup protocols * @scancode_filter: scancode filter * @scancode_wakeup_filter: scancode wakeup filters - * @scanmask: some hardware decoders are not capable of providing the full + * @scancode_mask: some hardware decoders are not capable of providing the full * scancode to the application. As this is a hardware limit, we can't do * anything with it. Yet, as the same keycode table can be used with other * devices, a mask is provided to allow its usage. Drivers should generally * leave this field in blank + * @users: number of current users of the device * @priv: driver-specific data * @keylock: protects the remaining members of the struct * @keypressed: whether a key is currently pressed @@ -157,8 +158,8 @@ struct rc_dev { u64 enabled_wakeup_protocols; struct rc_scancode_filter scancode_filter; struct rc_scancode_filter scancode_wakeup_filter; + u32 scancode_mask; u32 users; - u32 scanmask; void *priv; spinlock_t keylock; bool keypressed;