From patchwork Sun Oct 12 11:31:38 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Olli Salonen X-Patchwork-Id: 5070471 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.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id DC72E9F295 for ; Sun, 12 Oct 2014 11:31:47 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E505D20115 for ; Sun, 12 Oct 2014 11:31:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4D7BE2010F for ; Sun, 12 Oct 2014 11:31:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751212AbaJLLbm (ORCPT ); Sun, 12 Oct 2014 07:31:42 -0400 Received: from mail-lb0-f182.google.com ([209.85.217.182]:56805 "EHLO mail-lb0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751115AbaJLLbl (ORCPT ); Sun, 12 Oct 2014 07:31:41 -0400 Received: by mail-lb0-f182.google.com with SMTP id z11so5047733lbi.41 for ; Sun, 12 Oct 2014 04:31:40 -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:date:from:to:cc:subject:in-reply-to :message-id:references:user-agent:mime-version:content-type; bh=+CR5+RcnR48jOBfxRuZGyhQxQ9zfvBWFs5tf/lgGMtM=; b=kObC6VcmPwuHcrJgrDZxmZuKhJz5RsmKcTHDaSibPoLb5Oj5lRg1jrP4nIDmfOOBB4 FbduV8Scq9qBLsqr1ufqUr1/QJKSNkbBUgrfy48aTxGSVV0zg3e6PZ3d9oFxYAf8B9Bq knq8d9c1DRXcWLNCO4QxumoHi2bIK+4ufhdhyrQB3/yX5eZXtW/KtSbb5H9+h6BCye3X TG3s7EJaXtslQiMaXoZVyYF2M50rS045RVu+qW2sWoNg5BtKxLXQC9gFpxF+rXnSEhtU +9kT9SvKPOp8cyFc3JGNcD3liXX8Z5Oim0xDJS9HwNkbfw2BM6I1N84KTOBclfr35gWR QRmg== X-Gm-Message-State: ALoCoQl+MGmv32+JhzMrWcqMQUrlmwcc0sjggJdQu1nCbjjhrsLEc+2zq+wfy6K3kcrcJQXfOGvz X-Received: by 10.152.43.50 with SMTP id t18mr1934217lal.91.1413113500343; Sun, 12 Oct 2014 04:31:40 -0700 (PDT) Received: from [192.168.0.10] (87-93-228-250.bb.dnainternet.fi. [87.93.228.250]) by mx.google.com with ESMTPSA id nz10sm3528673lbb.35.2014.10.12.04.31.39 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 12 Oct 2014 04:31:39 -0700 (PDT) Date: Sun, 12 Oct 2014 14:31:38 +0300 (EEST) From: Olli Salonen X-X-Sender: olli@olli-desktop To: linux-media@vger.kernel.org cc: crope@iki.fi Subject: [PATCHv2 4/4] dvbsky: add option to disable IR receiver In-Reply-To: <543A5D7B.8020401@iki.fi> Message-ID: References: <1413108191-32510-1-git-send-email-olli.salonen@iki.fi> <1413108191-32510-4-git-send-email-olli.salonen@iki.fi> <543A540A.2010507@iki.fi> <543A5D7B.8020401@iki.fi> User-Agent: Alpine 2.10 (DEB 1266 2009-07-14) 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=-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 Add an option to disable remote controller for DVBSky devices by specifying the disable_rc option at modprobe. Signed-off-by: Olli Salonen --- -- 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/usb/dvb-usb-v2/dvbsky.c b/drivers/media/usb/dvb-usb-v2/dvbsky.c index 5c7387a..f2d0eb7 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,11 @@ 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) { + rc->map_name = NULL; + return 0; + } + rc->allowed_protos = RC_BIT_RC5; rc->query = dvbsky_rc_query; rc->interval = 300;