summaryrefslogtreecommitdiffstats
path: root/drivers/media/tuners/tuner-xc2028.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@s-opensource.com>2016-12-15 08:38:35 -0200
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2016-12-15 08:38:35 -0200
commit65390ea01ce678379da32b01f39fcfac4903f256 (patch)
tree7f849d66121533c331cf61136b124218d87cbf86 /drivers/media/tuners/tuner-xc2028.c
parente7aa8c2eb11ba69b1b69099c3c7bd6be3087b0ba (diff)
parentd183e4efcae8d88a2f252e546978658ca6d273cc (diff)
downloadlinux-stable-65390ea01ce678379da32b01f39fcfac4903f256.tar.gz
linux-stable-65390ea01ce678379da32b01f39fcfac4903f256.tar.bz2
linux-stable-65390ea01ce678379da32b01f39fcfac4903f256.zip
Merge branch 'patchwork' into v4l_for_linus
* patchwork: (496 commits) [media] v4l: tvp5150: Add missing break in set control handler [media] v4l: tvp5150: Don't inline the tvp5150_selmux() function [media] v4l: tvp5150: Compile tvp5150_link_setup out if !CONFIG_MEDIA_CONTROLLER [media] em28xx: don't store usb_device at struct em28xx [media] em28xx: use usb_interface for dev_foo() calls [media] em28xx: don't change the device's name [media] mn88472: fix chip id check on probe [media] mn88473: fix chip id check on probe [media] lirc: fix error paths in lirc_cdev_add() [media] s5p-mfc: Add support for MFC v8 available in Exynos 5433 SoCs [media] s5p-mfc: Rework clock handling [media] s5p-mfc: Don't keep clock prepared all the time [media] s5p-mfc: Kill all IS_ERR_OR_NULL in clocks management code [media] s5p-mfc: Remove dead conditional code [media] s5p-mfc: Ensure that clock is disabled before turning power off [media] s5p-mfc: Remove special clock rate management [media] s5p-mfc: Use printk_ratelimited for reporting ioctl errors [media] s5p-mfc: Set DMA_ATTR_ALLOC_SINGLE_PAGES [media] vivid: Set color_enc on HSV formats [media] v4l2-tpg: Init hv_enc field with a valid value ...
Diffstat (limited to 'drivers/media/tuners/tuner-xc2028.c')
-rw-r--r--drivers/media/tuners/tuner-xc2028.c120
1 files changed, 58 insertions, 62 deletions
diff --git a/drivers/media/tuners/tuner-xc2028.c b/drivers/media/tuners/tuner-xc2028.c
index 8d96a22647b3..b5b62b08159e 100644
--- a/drivers/media/tuners/tuner-xc2028.c
+++ b/drivers/media/tuners/tuner-xc2028.c
@@ -56,8 +56,7 @@ MODULE_PARM_DESC(no_poweroff, "0 (default) powers device off when not used.\n"
static char audio_std[8];
module_param_string(audio_std, audio_std, sizeof(audio_std), 0);
MODULE_PARM_DESC(audio_std,
- "Audio standard. XC3028 audio decoder explicitly "
- "needs to know what audio\n"
+ "Audio standard. XC3028 audio decoder explicitly needs to know what audio\n"
"standard is needed for some video standards with audio A2 or NICAM.\n"
"The valid values are:\n"
"A2\n"
@@ -69,8 +68,8 @@ MODULE_PARM_DESC(audio_std,
static char firmware_name[30];
module_param_string(firmware_name, firmware_name, sizeof(firmware_name), 0);
-MODULE_PARM_DESC(firmware_name, "Firmware file name. Allows overriding the "
- "default firmware name\n");
+MODULE_PARM_DESC(firmware_name,
+ "Firmware file name. Allows overriding the default firmware name\n");
static LIST_HEAD(hybrid_tuner_instance_list);
static DEFINE_MUTEX(xc2028_list_mutex);
@@ -179,67 +178,67 @@ static int xc2028_get_reg(struct xc2028_data *priv, u16 reg, u16 *val)
static void dump_firm_type_and_int_freq(unsigned int type, u16 int_freq)
{
if (type & BASE)
- printk("BASE ");
+ printk(KERN_CONT "BASE ");
if (type & INIT1)
- printk("INIT1 ");
+ printk(KERN_CONT "INIT1 ");
if (type & F8MHZ)
- printk("F8MHZ ");
+ printk(KERN_CONT "F8MHZ ");
if (type & MTS)
- printk("MTS ");
+ printk(KERN_CONT "MTS ");
if (type & D2620)
- printk("D2620 ");
+ printk(KERN_CONT "D2620 ");
if (type & D2633)
- printk("D2633 ");
+ printk(KERN_CONT "D2633 ");
if (type & DTV6)
- printk("DTV6 ");
+ printk(KERN_CONT "DTV6 ");
if (type & QAM)
- printk("QAM ");
+ printk(KERN_CONT "QAM ");
if (type & DTV7)
- printk("DTV7 ");
+ printk(KERN_CONT "DTV7 ");
if (type & DTV78)
- printk("DTV78 ");
+ printk(KERN_CONT "DTV78 ");
if (type & DTV8)
- printk("DTV8 ");
+ printk(KERN_CONT "DTV8 ");
if (type & FM)
- printk("FM ");
+ printk(KERN_CONT "FM ");
if (type & INPUT1)
- printk("INPUT1 ");
+ printk(KERN_CONT "INPUT1 ");
if (type & LCD)
- printk("LCD ");
+ printk(KERN_CONT "LCD ");
if (type & NOGD)
- printk("NOGD ");
+ printk(KERN_CONT "NOGD ");
if (type & MONO)
- printk("MONO ");
+ printk(KERN_CONT "MONO ");
if (type & ATSC)
- printk("ATSC ");
+ printk(KERN_CONT "ATSC ");
if (type & IF)
- printk("IF ");
+ printk(KERN_CONT "IF ");
if (type & LG60)
- printk("LG60 ");
+ printk(KERN_CONT "LG60 ");
if (type & ATI638)
- printk("ATI638 ");
+ printk(KERN_CONT "ATI638 ");
if (type & OREN538)
- printk("OREN538 ");
+ printk(KERN_CONT "OREN538 ");
if (type & OREN36)
- printk("OREN36 ");
+ printk(KERN_CONT "OREN36 ");
if (type & TOYOTA388)
- printk("TOYOTA388 ");
+ printk(KERN_CONT "TOYOTA388 ");
if (type & TOYOTA794)
- printk("TOYOTA794 ");
+ printk(KERN_CONT "TOYOTA794 ");
if (type & DIBCOM52)
- printk("DIBCOM52 ");
+ printk(KERN_CONT "DIBCOM52 ");
if (type & ZARLINK456)
- printk("ZARLINK456 ");
+ printk(KERN_CONT "ZARLINK456 ");
if (type & CHINA)
- printk("CHINA ");
+ printk(KERN_CONT "CHINA ");
if (type & F6MHZ)
- printk("F6MHZ ");
+ printk(KERN_CONT "F6MHZ ");
if (type & INPUT2)
- printk("INPUT2 ");
+ printk(KERN_CONT "INPUT2 ");
if (type & SCODE)
- printk("SCODE ");
+ printk(KERN_CONT "SCODE ");
if (type & HAS_IF)
- printk("HAS_IF_%d ", int_freq);
+ printk(KERN_CONT "HAS_IF_%d ", int_freq);
}
static v4l2_std_id parse_audio_std_option(void)
@@ -351,8 +350,7 @@ static int load_all_firmwares(struct dvb_frontend *fe,
n++;
if (n >= n_array) {
- tuner_err("More firmware images in file than "
- "were expected!\n");
+ tuner_err("More firmware images in file than were expected!\n");
goto corrupt;
}
@@ -379,8 +377,8 @@ static int load_all_firmwares(struct dvb_frontend *fe,
if (!size || size > endp - p) {
tuner_err("Firmware type ");
dump_firm_type(type);
- printk("(%x), id %llx is corrupted "
- "(size=%d, expected %d)\n",
+ printk(KERN_CONT
+ "(%x), id %llx is corrupted (size=%d, expected %d)\n",
type, (unsigned long long)id,
(unsigned)(endp - p), size);
goto corrupt;
@@ -395,7 +393,7 @@ static int load_all_firmwares(struct dvb_frontend *fe,
tuner_dbg("Reading firmware type ");
if (debug) {
dump_firm_type_and_int_freq(type, int_freq);
- printk("(%x), id %llx, size=%d.\n",
+ printk(KERN_CONT "(%x), id %llx, size=%d.\n",
type, (unsigned long long)id, size);
}
@@ -444,7 +442,8 @@ static int seek_firmware(struct dvb_frontend *fe, unsigned int type,
tuner_dbg("%s called, want type=", __func__);
if (debug) {
dump_firm_type(type);
- printk("(%x), id %016llx.\n", type, (unsigned long long)*id);
+ printk(KERN_CONT "(%x), id %016llx.\n",
+ type, (unsigned long long)*id);
}
if (!priv->firm) {
@@ -500,10 +499,11 @@ static int seek_firmware(struct dvb_frontend *fe, unsigned int type,
}
if (best_nr_matches > 0) {
- tuner_dbg("Selecting best matching firmware (%d bits) for "
- "type=", best_nr_matches);
+ tuner_dbg("Selecting best matching firmware (%d bits) for type=",
+ best_nr_matches);
dump_firm_type(type);
- printk("(%x), id %016llx:\n", type, (unsigned long long)*id);
+ printk(KERN_CONT
+ "(%x), id %016llx:\n", type, (unsigned long long)*id);
i = best_i;
goto found;
}
@@ -520,7 +520,8 @@ ret:
tuner_dbg("%s firmware for type=", (i < 0) ? "Can't find" : "Found");
if (debug) {
dump_firm_type(type);
- printk("(%x), id %016llx.\n", type, (unsigned long long)*id);
+ printk(KERN_CONT "(%x), id %016llx.\n",
+ type, (unsigned long long)*id);
}
return i;
}
@@ -560,8 +561,8 @@ static int load_firmware(struct dvb_frontend *fe, unsigned int type,
tuner_info("Loading firmware for type=");
dump_firm_type(priv->firm[pos].type);
- printk("(%x), id %016llx.\n", priv->firm[pos].type,
- (unsigned long long)*id);
+ printk(KERN_CONT "(%x), id %016llx.\n",
+ priv->firm[pos].type, (unsigned long long)*id);
p = priv->firm[pos].ptr;
endp = p + priv->firm[pos].size;
@@ -694,7 +695,7 @@ static int load_scode(struct dvb_frontend *fe, unsigned int type,
tuner_info("Loading SCODE for type=");
dump_firm_type_and_int_freq(priv->firm[pos].type,
priv->firm[pos].int_freq);
- printk("(%x), id %016llx.\n", priv->firm[pos].type,
+ printk(KERN_CONT "(%x), id %016llx.\n", priv->firm[pos].type,
(unsigned long long)*id);
if (priv->firm_version < 0x0202)
@@ -746,15 +747,15 @@ retry:
tuner_dbg("checking firmware, user requested type=");
if (debug) {
dump_firm_type(new_fw.type);
- printk("(%x), id %016llx, ", new_fw.type,
+ printk(KERN_CONT "(%x), id %016llx, ", new_fw.type,
(unsigned long long)new_fw.std_req);
if (!int_freq) {
- printk("scode_tbl ");
+ printk(KERN_CONT "scode_tbl ");
dump_firm_type(priv->ctrl.scode_table);
- printk("(%x), ", priv->ctrl.scode_table);
+ printk(KERN_CONT "(%x), ", priv->ctrl.scode_table);
} else
- printk("int_freq %d, ", new_fw.int_freq);
- printk("scode_nr %d\n", new_fw.scode_nr);
+ printk(KERN_CONT "int_freq %d, ", new_fw.int_freq);
+ printk(KERN_CONT "scode_nr %d\n", new_fw.scode_nr);
}
/*
@@ -842,8 +843,7 @@ check_device:
goto fail;
}
- tuner_dbg("Device is Xceive %d version %d.%d, "
- "firmware version %d.%d\n",
+ tuner_dbg("Device is Xceive %d version %d.%d, firmware version %d.%d\n",
hwmodel, (version & 0xf000) >> 12, (version & 0xf00) >> 8,
(version & 0xf0) >> 4, version & 0xf);
@@ -857,8 +857,7 @@ check_device:
tuner_err("Incorrect readback of firmware version.\n");
goto fail;
} else {
- tuner_err("Returned an incorrect version. However, "
- "read is not reliable enough. Ignoring it.\n");
+ tuner_err("Returned an incorrect version. However, read is not reliable enough. Ignoring it.\n");
hwmodel = 3028;
}
}
@@ -869,8 +868,7 @@ check_device:
priv->hwvers = version & 0xff00;
} else if (priv->hwmodel == 0 || priv->hwmodel != hwmodel ||
priv->hwvers != (version & 0xff00)) {
- tuner_err("Read invalid device hardware information - tuner "
- "hung?\n");
+ tuner_err("Read invalid device hardware information - tuner hung?\n");
goto fail;
}
@@ -1327,7 +1325,7 @@ static int xc2028_sleep(struct dvb_frontend *fe)
return rc;
}
-static int xc2028_dvb_release(struct dvb_frontend *fe)
+static void xc2028_dvb_release(struct dvb_frontend *fe)
{
struct xc2028_data *priv = fe->tuner_priv;
@@ -1345,8 +1343,6 @@ static int xc2028_dvb_release(struct dvb_frontend *fe)
mutex_unlock(&xc2028_list_mutex);
fe->tuner_priv = NULL;
-
- return 0;
}
static int xc2028_get_frequency(struct dvb_frontend *fe, u32 *frequency)