From patchwork Fri Mar 11 06:48:03 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Olli Salonen X-Patchwork-Id: 8562441 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 D20859F9A0 for ; Fri, 11 Mar 2016 06:48:19 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5FB6E20361 for ; Fri, 11 Mar 2016 06:48:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id F0D6B20377 for ; Fri, 11 Mar 2016 06:48:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755065AbcCKGsO (ORCPT ); Fri, 11 Mar 2016 01:48:14 -0500 Received: from mail-lb0-f179.google.com ([209.85.217.179]:34259 "EHLO mail-lb0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754082AbcCKGsO (ORCPT ); Fri, 11 Mar 2016 01:48:14 -0500 Received: by mail-lb0-f179.google.com with SMTP id xr8so138158651lbb.1 for ; Thu, 10 Mar 2016 22:48:13 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=bI86rSykqOWxN2UPHBnRXoBCFga5yjjb3V19Jk4gs0k=; b=YDwagLB/TSyT1H00bCON/zXCDl92mYOfb64J6cgZb5kbw2aQsP5fvNHkU+906v1Y8g NJbIG/KJI3a+2v318cMm3FRWorf57nShsoYxQ4uzBjNxvXFM8jKy12EYmMN1CtdtXjtx or2DVAceayfop/wbphMmiDPpNtvICGPQUCSLXuLxBb6JaS+9vDMHrTfTewBNxFK4qMqf gve2QlXFk4NuJQB+ivx3ITn0635du2Z/AlQZkX2gOfex2tUDcF0inNpvXcw5Sl9vWJzr ps8rUlFzFG4omdfm3hTcIwOMoSmtwUV9mtBkT0ad95F5PSRcrKetrdF2F8VZ9GfsnEdT 6EtQ== X-Gm-Message-State: AD7BkJI0mPEXHn903BNiyfLl8Fpl86/kRtvMYItxBHyu803u5mPUG3T4EqSCii12VFSXPQ== X-Received: by 10.25.145.72 with SMTP id t69mr2599237lfd.17.1457678892493; Thu, 10 Mar 2016 22:48:12 -0800 (PST) Received: from dl160.lan (178-55-1-76.bb.dnainternet.fi. [178.55.1.76]) by smtp.gmail.com with ESMTPSA id k3sm1123814lbp.9.2016.03.10.22.48.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 10 Mar 2016 22:48:11 -0800 (PST) From: Olli Salonen To: linux-media@vger.kernel.org Cc: nibble.max@gmail.com, Olli Salonen Subject: [PATCH] smipcie: add RC map into card configuration options Date: Fri, 11 Mar 2016 08:48:03 +0200 Message-Id: <1457678883-18427-1-git-send-email-olli.salonen@iki.fi> X-Mailer: git-send-email 1.9.1 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, 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 Remove the if..else statement from smipcie-ir.c and add the remote controller map as a configuration parameter for the card. Signed-off-by: Olli Salonen --- drivers/media/pci/smipcie/smipcie-ir.c | 5 +---- drivers/media/pci/smipcie/smipcie-main.c | 4 ++++ drivers/media/pci/smipcie/smipcie.h | 1 + 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/media/pci/smipcie/smipcie-ir.c b/drivers/media/pci/smipcie/smipcie-ir.c index d737b5e..826c7c7 100644 --- a/drivers/media/pci/smipcie/smipcie-ir.c +++ b/drivers/media/pci/smipcie/smipcie-ir.c @@ -203,10 +203,7 @@ int smi_ir_init(struct smi_dev *dev) rc_dev->dev.parent = &dev->pci_dev->dev; rc_dev->driver_type = RC_DRIVER_SCANCODE; - if (dev->info->type == SMI_TECHNOTREND_S2_4200) - rc_dev->map_name = RC_MAP_TT_1500; - else - rc_dev->map_name = RC_MAP_DVBSKY; + rc_dev->map_name = dev->info->rc_map; ir->rc_dev = rc_dev; ir->dev = dev; diff --git a/drivers/media/pci/smipcie/smipcie-main.c b/drivers/media/pci/smipcie/smipcie-main.c index 4a9275a..83981d61 100644 --- a/drivers/media/pci/smipcie/smipcie-main.c +++ b/drivers/media/pci/smipcie/smipcie-main.c @@ -1067,6 +1067,7 @@ static struct smi_cfg_info dvbsky_s950_cfg = { .ts_1 = SMI_TS_DMA_BOTH, .fe_0 = DVBSKY_FE_NULL, .fe_1 = DVBSKY_FE_M88DS3103, + .rc_map = RC_MAP_DVBSKY, }; static struct smi_cfg_info dvbsky_s952_cfg = { @@ -1076,6 +1077,7 @@ static struct smi_cfg_info dvbsky_s952_cfg = { .ts_1 = SMI_TS_DMA_BOTH, .fe_0 = DVBSKY_FE_M88RS6000, .fe_1 = DVBSKY_FE_M88RS6000, + .rc_map = RC_MAP_DVBSKY, }; static struct smi_cfg_info dvbsky_t9580_cfg = { @@ -1085,6 +1087,7 @@ static struct smi_cfg_info dvbsky_t9580_cfg = { .ts_1 = SMI_TS_DMA_BOTH, .fe_0 = DVBSKY_FE_SIT2, .fe_1 = DVBSKY_FE_M88DS3103, + .rc_map = RC_MAP_DVBSKY, }; static struct smi_cfg_info technotrend_s2_4200_cfg = { @@ -1094,6 +1097,7 @@ static struct smi_cfg_info technotrend_s2_4200_cfg = { .ts_1 = SMI_TS_DMA_BOTH, .fe_0 = DVBSKY_FE_M88RS6000, .fe_1 = DVBSKY_FE_M88RS6000, + .rc_map = RC_MAP_TT_1500, }; /* PCI IDs */ diff --git a/drivers/media/pci/smipcie/smipcie.h b/drivers/media/pci/smipcie/smipcie.h index 5528e48..611e4f0 100644 --- a/drivers/media/pci/smipcie/smipcie.h +++ b/drivers/media/pci/smipcie/smipcie.h @@ -233,6 +233,7 @@ struct smi_cfg_info { #define DVBSKY_FE_SIT2 3 int fe_0; int fe_1; + char *rc_map; }; struct smi_rc {