[PATCH 6/6] [media] ds3000: add module parameter to force firmware upload

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Rémi Cardona <remi.cardona@xxxxxxxxxxxx>
---
 drivers/media/dvb/frontends/ds3000.c |    9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/drivers/media/dvb/frontends/ds3000.c b/drivers/media/dvb/frontends/ds3000.c
index 970963c..3e0e9de 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,10 +397,13 @@ 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) {
 		printk(KERN_INFO "%s: Firmware already uploaded, skipping\n",
 			__func__);
 		return ret;
+	} else if (ret == 0 && force_fw_upload) {
+		printk(KERN_INFO "%s: Firmware already uploaded, "
+			"forcing upload\n", __func__);
 	} else if (ret < 0) {
 		return ret;
 	}
@@ -1308,6 +1312,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");
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux