All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mchehab@redhat.com>
To: Antti Palosaari <crope@iki.fi>
Cc: "Rémi Cardona" <remi.cardona@smartjog.com>,
	linux-media@vger.kernel.org, liplianin@me.by
Subject: Re: [PATCH 6/7] [media] ds3000: add module parameter to force firmware upload
Date: Sun, 7 Oct 2012 09:34:43 -0300	[thread overview]
Message-ID: <20121007093443.5626783f@redhat.com> (raw)
In-Reply-To: <506B88FB.1090707@iki.fi>

Em Wed, 03 Oct 2012 03:38:19 +0300
Antti Palosaari <crope@iki.fi> escreveu:

> On 09/28/2012 03:59 PM, Rémi Cardona wrote:
> > Signed-off-by: Rémi Cardona <remi.cardona@smartjog.com>

Next time, please provide a better comment: why such change is
needed?

> 
> Reviewed-by: Antti Palosaari <crope@iki.fi>
> 
> 
> > ---
> >   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 <remi.cardona@smartjog.com>

[mchehab@redhat.com: Fix a merge conflict]
Signed-off-by: Rémi Cardona <remi.cardona@smartjog.com>
Reviewed-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

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");

-- 
Regards,
Mauro

  reply	other threads:[~2012-10-07 12:35 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1348837172-11784-1-git-send-email-remi.cardona@smartjog.com>
2012-10-01 10:15 ` [PATCH v3 0/7] ds3000/dw2102 improvements Rémi Cardona
2012-10-03  0:34   ` Antti Palosaari
     [not found] ` <1348837172-11784-2-git-send-email-remi.cardona@smartjog.com>
2012-10-03  0:36   ` [PATCH 1/7] [media] ds3000: Declare MODULE_FIRMWARE usage Antti Palosaari
     [not found] ` <1348837172-11784-3-git-send-email-remi.cardona@smartjog.com>
2012-10-03  0:37   ` [PATCH 2/7] [media] ds3000: remove useless 'locking' Antti Palosaari
     [not found] ` <1348837172-11784-4-git-send-email-remi.cardona@smartjog.com>
2012-10-03  0:37   ` [PATCH 3/7] [media] ds3000: properly report register read errors Antti Palosaari
     [not found] ` <1348837172-11784-5-git-send-email-remi.cardona@smartjog.com>
2012-10-03  0:37   ` [PATCH 4/7] [media] ds3000: bail out early on i2c failures during firmware load Antti Palosaari
     [not found] ` <1348837172-11784-6-git-send-email-remi.cardona@smartjog.com>
2012-10-03  0:37   ` [PATCH 5/7] [media] ds3000: properly report firmware probing issues Antti Palosaari
     [not found] ` <1348837172-11784-7-git-send-email-remi.cardona@smartjog.com>
2012-10-03  0:38   ` [PATCH 6/7] [media] ds3000: add module parameter to force firmware upload Antti Palosaari
2012-10-07 12:34     ` Mauro Carvalho Chehab [this message]
     [not found] ` <1348837172-11784-8-git-send-email-remi.cardona@smartjog.com>
2012-10-03  0:41   ` [PATCH 7/7] [media] dw2102: Declare MODULE_FIRMWARE usage Antti Palosaari

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20121007093443.5626783f@redhat.com \
    --to=mchehab@redhat.com \
    --cc=crope@iki.fi \
    --cc=linux-media@vger.kernel.org \
    --cc=liplianin@me.by \
    --cc=remi.cardona@smartjog.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.