summaryrefslogtreecommitdiffstats
path: root/drivers/media/common
diff options
context:
space:
mode:
authorIstvan Varga <istvan_v@mailbox.hu>2011-06-04 11:48:16 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-07-27 17:52:34 -0300
commitfa285bc1bf5a2ebe3252523454def096d86a064b (patch)
tree6b7e8f8863511a1d8976eaaa9a30a63f192f71d6 /drivers/media/common
parent1368ceb266990af58a72cdb0e121eb4ff22bde6f (diff)
downloadop-kernel-dev-fa285bc1bf5a2ebe3252523454def096d86a064b.zip
op-kernel-dev-fa285bc1bf5a2ebe3252523454def096d86a064b.tar.gz
[media] xc4000: added firmware_name parameter
The firmware_name module parameter makes it possible to set the firmware file name. It defaults to "xc4000.fw" if not specified. Signed-off-by: Istvan Varga <istvan_v@mailbox.hu> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/common')
-rw-r--r--drivers/media/common/tuners/xc4000.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/drivers/media/common/tuners/xc4000.c b/drivers/media/common/tuners/xc4000.c
index f50dd6e..229a215 100644
--- a/drivers/media/common/tuners/xc4000.c
+++ b/drivers/media/common/tuners/xc4000.c
@@ -47,16 +47,20 @@ MODULE_PARM_DESC(no_poweroff, "0 (default) powers device off when not used.\n"
"\t\t1 keep device energized and with tuner ready all the times.\n"
"\t\tFaster, but consumes more power and keeps the device hotter");
+#define XC4000_DEFAULT_FIRMWARE "xc4000.fw"
+
+static char firmware_name[30];
+module_param_string(firmware_name, firmware_name, sizeof(firmware_name), 0);
+MODULE_PARM_DESC(firmware_name, "\n\t\tFirmware file name. Allows overriding "
+ "the default firmware\n"
+ "\t\tname.");
+
static DEFINE_MUTEX(xc4000_list_mutex);
static LIST_HEAD(hybrid_tuner_instance_list);
#define dprintk(level, fmt, arg...) if (debug >= level) \
printk(KERN_INFO "%s: " fmt, "xc4000", ## arg)
-/* Note that the last version digit is my internal build number (so I can
- rev the firmware even if the core Xceive firmware was unchanged) */
-#define XC4000_DEFAULT_FIRMWARE "dvb-fe-xc4000-1.4.1.fw"
-
/* struct for storing firmware table */
struct firmware_description {
unsigned int type;
@@ -715,7 +719,10 @@ static int xc4000_fwupload(struct dvb_frontend *fe)
char name[33];
const char *fname;
- fname = XC4000_DEFAULT_FIRMWARE;
+ if (firmware_name[0] != '\0')
+ fname = firmware_name;
+ else
+ fname = XC4000_DEFAULT_FIRMWARE;
printk("Reading firmware %s\n", fname);
rc = request_firmware(&fw, fname, priv->i2c_props.adap->dev.parent);
OpenPOWER on IntegriCloud