diff options
author | Istvan Varga <istvan_v@mailbox.hu> | 2011-06-04 10:48:16 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-07-27 16:52:34 -0400 |
commit | fa285bc1bf5a2ebe3252523454def096d86a064b (patch) | |
tree | 6b7e8f8863511a1d8976eaaa9a30a63f192f71d6 /drivers/media | |
parent | 1368ceb266990af58a72cdb0e121eb4ff22bde6f (diff) |
[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')
-rw-r--r-- | drivers/media/common/tuners/xc4000.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/drivers/media/common/tuners/xc4000.c b/drivers/media/common/tuners/xc4000.c index f50dd6e713f..229a2155b2e 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" | |||
47 | "\t\t1 keep device energized and with tuner ready all the times.\n" | 47 | "\t\t1 keep device energized and with tuner ready all the times.\n" |
48 | "\t\tFaster, but consumes more power and keeps the device hotter"); | 48 | "\t\tFaster, but consumes more power and keeps the device hotter"); |
49 | 49 | ||
50 | #define XC4000_DEFAULT_FIRMWARE "xc4000.fw" | ||
51 | |||
52 | static char firmware_name[30]; | ||
53 | module_param_string(firmware_name, firmware_name, sizeof(firmware_name), 0); | ||
54 | MODULE_PARM_DESC(firmware_name, "\n\t\tFirmware file name. Allows overriding " | ||
55 | "the default firmware\n" | ||
56 | "\t\tname."); | ||
57 | |||
50 | static DEFINE_MUTEX(xc4000_list_mutex); | 58 | static DEFINE_MUTEX(xc4000_list_mutex); |
51 | static LIST_HEAD(hybrid_tuner_instance_list); | 59 | static LIST_HEAD(hybrid_tuner_instance_list); |
52 | 60 | ||
53 | #define dprintk(level, fmt, arg...) if (debug >= level) \ | 61 | #define dprintk(level, fmt, arg...) if (debug >= level) \ |
54 | printk(KERN_INFO "%s: " fmt, "xc4000", ## arg) | 62 | printk(KERN_INFO "%s: " fmt, "xc4000", ## arg) |
55 | 63 | ||
56 | /* Note that the last version digit is my internal build number (so I can | ||
57 | rev the firmware even if the core Xceive firmware was unchanged) */ | ||
58 | #define XC4000_DEFAULT_FIRMWARE "dvb-fe-xc4000-1.4.1.fw" | ||
59 | |||
60 | /* struct for storing firmware table */ | 64 | /* struct for storing firmware table */ |
61 | struct firmware_description { | 65 | struct firmware_description { |
62 | unsigned int type; | 66 | unsigned int type; |
@@ -715,7 +719,10 @@ static int xc4000_fwupload(struct dvb_frontend *fe) | |||
715 | char name[33]; | 719 | char name[33]; |
716 | const char *fname; | 720 | const char *fname; |
717 | 721 | ||
718 | fname = XC4000_DEFAULT_FIRMWARE; | 722 | if (firmware_name[0] != '\0') |
723 | fname = firmware_name; | ||
724 | else | ||
725 | fname = XC4000_DEFAULT_FIRMWARE; | ||
719 | 726 | ||
720 | printk("Reading firmware %s\n", fname); | 727 | printk("Reading firmware %s\n", fname); |
721 | rc = request_firmware(&fw, fname, priv->i2c_props.adap->dev.parent); | 728 | rc = request_firmware(&fw, fname, priv->i2c_props.adap->dev.parent); |