From patchwork Sun Oct 12 10:03:11 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Olli Salonen X-Patchwork-Id: 5070381 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 C195BC11AC for ; Sun, 12 Oct 2014 10:04:14 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DA6A620125 for ; Sun, 12 Oct 2014 10:04:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1D770200E5 for ; Sun, 12 Oct 2014 10:04:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751248AbaJLKEL (ORCPT ); Sun, 12 Oct 2014 06:04:11 -0400 Received: from mail-la0-f54.google.com ([209.85.215.54]:51338 "EHLO mail-la0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751175AbaJLKEJ (ORCPT ); Sun, 12 Oct 2014 06:04:09 -0400 Received: by mail-la0-f54.google.com with SMTP id gm9so5200889lab.41 for ; Sun, 12 Oct 2014 03:04:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=iIi/wyAkRW0yCCg8uNK6oJJGpXwW3HOi29em0k4uMK8=; b=Op6+Iq0nIr8IZWWCx+bLuNHPGGtZMn1/60kiT9TqS1URvQoCwPIJav6bIZVbT9EmJI +VtFktKldHlUoVZGKBdQKlxwjwctpYlRqtxi0ZJ3UhNUTQtx+jKS3i9Pqy3nn9xom+01 rYyqrDvdBbK/HNrcb2XJfW5tXPA64Zvt8Jau92yUYDvmjXEft0txwWZBxoCQXpoDDraR TJ7oW2NHPIYpGeHxW3g1ySodyVzuV1Q3iE12UVripmp1DD3pjCDK3hVOYmiPkTKqvPA0 GCuLMFri56vQQV/MNBOnXJhWaWcOLcCS9RijJ0Hg34bDJh+16RgpSQdvSJn0GjIqlWqw BtTw== X-Gm-Message-State: ALoCoQliIf34Gwev8QEQmBQrNUUMHWsqGP1YmgAZFlXidDjUE9xHX82UV6B/TIeqDHzOvz2swm8o X-Received: by 10.112.219.3 with SMTP id pk3mr16811939lbc.14.1413108248272; Sun, 12 Oct 2014 03:04:08 -0700 (PDT) Received: from olli-desktop.lan (87-93-228-250.bb.dnainternet.fi. [87.93.228.250]) by mx.google.com with ESMTPSA id m1sm3475276lbt.22.2014.10.12.03.04.07 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 12 Oct 2014 03:04:07 -0700 (PDT) From: Olli Salonen To: linux-media@vger.kernel.org Cc: nibble.max@gmail.com, Olli Salonen Subject: [PATCH 4/4] dvbsky: add option to disable IR receiver Date: Sun, 12 Oct 2014 13:03:11 +0300 Message-Id: <1413108191-32510-4-git-send-email-olli.salonen@iki.fi> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1413108191-32510-1-git-send-email-olli.salonen@iki.fi> References: <1413108191-32510-1-git-send-email-olli.salonen@iki.fi> 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=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 Added an option disable_rc that can be used to disable the IR receiver polling for this module. Signed-off-by: Olli Salonen --- drivers/media/usb/dvb-usb-v2/dvbsky.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/media/usb/dvb-usb-v2/dvbsky.c b/drivers/media/usb/dvb-usb-v2/dvbsky.c index 5c7387a..71a3324 100644 --- a/drivers/media/usb/dvb-usb-v2/dvbsky.c +++ b/drivers/media/usb/dvb-usb-v2/dvbsky.c @@ -25,6 +25,10 @@ #define DVBSKY_MSG_DELAY 0/*2000*/ #define DVBSKY_BUF_LEN 64 +static int dvb_usb_dvbsky_disable_rc; +module_param_named(disable_rc, dvb_usb_dvbsky_disable_rc, int, 0644); +MODULE_PARM_DESC(disable_rc, "Disable inbuilt IR receiver."); + DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr); struct dvbsky_state { @@ -218,6 +222,10 @@ static int dvbsky_rc_query(struct dvb_usb_device *d) static int dvbsky_get_rc_config(struct dvb_usb_device *d, struct dvb_usb_rc *rc) { + if (dvb_usb_dvbsky_disable_rc) + return 0; + + rc->map_name = RC_MAP_DVBSKY; rc->allowed_protos = RC_BIT_RC5; rc->query = dvbsky_rc_query; rc->interval = 300; @@ -450,7 +458,7 @@ static struct dvb_usb_device_properties dvbsky_s960_props = { static const struct usb_device_id dvbsky_id_table[] = { { DVB_USB_DEVICE(0x0572, 0x6831, - &dvbsky_s960_props, "DVBSky S960/S860", RC_MAP_DVBSKY) }, + &dvbsky_s960_props, "DVBSky S960/S860", NULL) }, { } }; MODULE_DEVICE_TABLE(usb, dvbsky_id_table);