From patchwork Sun Oct 7 12:34:43 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 1561101 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 148B04025F for ; Sun, 7 Oct 2012 12:35:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750990Ab2JGMfD (ORCPT ); Sun, 7 Oct 2012 08:35:03 -0400 Received: from mx1.redhat.com ([209.132.183.28]:10820 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750851Ab2JGMfC convert rfc822-to-8bit (ORCPT ); Sun, 7 Oct 2012 08:35:02 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q97CYm6k022450 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 7 Oct 2012 08:34:48 -0400 Received: from localhost.localdomain (vpn1-7-211.gru2.redhat.com [10.97.7.211]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id q97CYiYE030471; Sun, 7 Oct 2012 08:34:45 -0400 Date: Sun, 7 Oct 2012 09:34:43 -0300 From: Mauro Carvalho Chehab To: Antti Palosaari Cc: =?UTF-8?B?UsOpbWk=?= Cardona , linux-media@vger.kernel.org, liplianin@me.by Subject: Re: [PATCH 6/7] [media] ds3000: add module parameter to force firmware upload Message-ID: <20121007093443.5626783f@redhat.com> In-Reply-To: <506B88FB.1090707@iki.fi> References: <1348837172-11784-1-git-send-email-remi.cardona@smartjog.com> <1348837172-11784-7-git-send-email-remi.cardona@smartjog.com> <506B88FB.1090707@iki.fi> Mime-Version: 1.0 X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Em Wed, 03 Oct 2012 03:38:19 +0300 Antti Palosaari escreveu: > On 09/28/2012 03:59 PM, Rémi Cardona wrote: > > Signed-off-by: Rémi Cardona Next time, please provide a better comment: why such change is needed? > > Reviewed-by: Antti Palosaari > > > > --- > > drivers/media/dvb-frontends/ds3000.c | 6 +++++- > > 1 file changed, 5 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/media/dvb-frontends/ds3000.c b/drivers/media/dvb-frontends/ds3000.c > > index 59184a8..c66d731 100644 > > --- a/drivers/media/dvb-frontends/ds3000.c > > +++ b/drivers/media/dvb-frontends/ds3000.c > > @@ -30,6 +30,7 @@ > > #include "ds3000.h" > > > > static int debug; > > +static int force_fw_upload; > > > > #define dprintk(args...) \ > > do { \ > > @@ -396,7 +397,7 @@ static int ds3000_firmware_ondemand(struct dvb_frontend *fe) > > dprintk("%s()\n", __func__); > > > > ret = ds3000_readreg(state, 0xb2); > > - if (ret == 0) { > > + if (ret == 0 && force_fw_upload == 0) { This hunk got a conflict. I solved it manually and applied. See below. Regards, Mauro - [PATCH] [media] ds3000: add module parameter to force firmware upload From: Rémi Cardona [mchehab@redhat.com: Fix a merge conflict] Signed-off-by: Rémi Cardona Reviewed-by: Antti Palosaari Signed-off-by: Mauro Carvalho Chehab diff --git a/drivers/media/dvb-frontends/ds3000.c b/drivers/media/dvb-frontends/ds3000.c index 4c8ac26..5b63908 100644 --- a/drivers/media/dvb-frontends/ds3000.c +++ b/drivers/media/dvb-frontends/ds3000.c @@ -30,6 +30,7 @@ #include "ds3000.h" static int debug; +static int force_fw_upload; #define dprintk(args...) \ do { \ @@ -392,11 +393,13 @@ static int ds3000_firmware_ondemand(struct dvb_frontend *fe) dprintk("%s()\n", __func__); - if (ds3000_readreg(state, 0xb2) <= 0) + ret = ds3000_readreg(state, 0xb2); + if (ret < 0) return ret; - if (state->skip_fw_load) - return 0; + if (state->skip_fw_load || !force_fw_upload) + return 0; /* Firmware already uploaded, skipping */ + /* Load firmware */ /* request the firmware, this will block until someone uploads it */ printk(KERN_INFO "%s: Waiting for firmware upload (%s)...\n", __func__, @@ -1306,6 +1309,9 @@ static struct dvb_frontend_ops ds3000_ops = { module_param(debug, int, 0644); MODULE_PARM_DESC(debug, "Activates frontend debugging (default:0)"); +module_param(force_fw_upload, int, 0644); +MODULE_PARM_DESC(force_fw_upload, "Force firmware upload (default:0)"); + MODULE_DESCRIPTION("DVB Frontend module for Montage Technology " "DS3000/TS2020 hardware"); MODULE_AUTHOR("Konstantin Dimitrov");