Commit 4bd69e7b authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab

[media] dvb-frontends: don't break long lines

Due to the 80-cols restrictions, and latter due to checkpatch
warnings, several strings were broken into multiple lines. This
is not considered a good practice anymore, as it makes harder
to grep for strings at the source code.

As we're right now fixing other drivers due to KERN_CONT, we need
to be able to identify what printk strings don't end with a "\n".
It is a way easier to detect those if we don't break long lines.

So, join those continuation lines.

The patch was generated via the script below, and manually
adjusted if needed.

</script>
use Text::Tabs;
while (<>) {
	if ($next ne "") {
		$c=$_;
		if ($c =~ /^\s+\"(.*)/) {
			$c2=$1;
			$next =~ s/\"\n$//;
			$n = expand($next);
			$funpos = index($n, '(');
			$pos = index($c2, '",');
			if ($funpos && $pos > 0) {
				$s1 = substr $c2, 0, $pos + 2;
				$s2 = ' ' x ($funpos + 1) . substr $c2, $pos + 2;
				$s2 =~ s/^\s+//;

				$s2 = ' ' x ($funpos + 1) . $s2 if ($s2 ne "");

				print unexpand("$next$s1\n");
				print unexpand("$s2\n") if ($s2 ne "");
			} else {
				print "$next$c2\n";
			}
			$next="";
			next;
		} else {
			print $next;
		}
		$next="";
	} else {
		if (m/\"$/) {
			if (!m/\\n\"$/) {
				$next=$_;
				next;
			}
		}
	}
	print $_;
}
</script>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent 8720427c
...@@ -50,8 +50,8 @@ int au8522_writereg(struct au8522_state *state, u16 reg, u8 data) ...@@ -50,8 +50,8 @@ int au8522_writereg(struct au8522_state *state, u16 reg, u8 data)
ret = i2c_transfer(state->i2c, &msg, 1); ret = i2c_transfer(state->i2c, &msg, 1);
if (ret != 1) if (ret != 1)
printk("%s: writereg error (reg == 0x%02x, val == 0x%04x, " printk("%s: writereg error (reg == 0x%02x, val == 0x%04x, ret == %i)\n",
"ret == %i)\n", __func__, reg, data, ret); __func__, reg, data, ret);
return (ret != 1) ? -1 : 0; return (ret != 1) ? -1 : 0;
} }
......
...@@ -120,8 +120,8 @@ static int cx24110_writereg (struct cx24110_state* state, int reg, int data) ...@@ -120,8 +120,8 @@ static int cx24110_writereg (struct cx24110_state* state, int reg, int data)
int err; int err;
if ((err = i2c_transfer(state->i2c, &msg, 1)) != 1) { if ((err = i2c_transfer(state->i2c, &msg, 1)) != 1) {
dprintk ("%s: writereg error (err == %i, reg == 0x%02x," dprintk("%s: writereg error (err == %i, reg == 0x%02x, data == 0x%02x)\n",
" data == 0x%02x)\n", __func__, err, reg, data); __func__, err, reg, data);
return -EREMOTEIO; return -EREMOTEIO;
} }
......
...@@ -108,8 +108,8 @@ static int cx24113_writereg(struct cx24113_state *state, int reg, int data) ...@@ -108,8 +108,8 @@ static int cx24113_writereg(struct cx24113_state *state, int reg, int data)
.flags = 0, .buf = buf, .len = 2 }; .flags = 0, .buf = buf, .len = 2 };
int err = i2c_transfer(state->i2c, &msg, 1); int err = i2c_transfer(state->i2c, &msg, 1);
if (err != 1) { if (err != 1) {
printk(KERN_DEBUG "%s: writereg error(err == %i, reg == 0x%02x," printk(KERN_DEBUG "%s: writereg error(err == %i, reg == 0x%02x, data == 0x%02x)\n",
" data == 0x%02x)\n", __func__, err, reg, data); __func__, err, reg, data);
return err; return err;
} }
......
...@@ -209,8 +209,8 @@ static int cx24116_writereg(struct cx24116_state *state, int reg, int data) ...@@ -209,8 +209,8 @@ static int cx24116_writereg(struct cx24116_state *state, int reg, int data)
err = i2c_transfer(state->i2c, &msg, 1); err = i2c_transfer(state->i2c, &msg, 1);
if (err != 1) { if (err != 1) {
printk(KERN_ERR "%s: writereg error(err == %i, reg == 0x%02x," printk(KERN_ERR "%s: writereg error(err == %i, reg == 0x%02x, value == 0x%02x)\n",
" value == 0x%02x)\n", __func__, err, reg, data); __func__, err, reg, data);
return -EREMOTEIO; return -EREMOTEIO;
} }
...@@ -498,8 +498,8 @@ static int cx24116_firmware_ondemand(struct dvb_frontend *fe) ...@@ -498,8 +498,8 @@ static int cx24116_firmware_ondemand(struct dvb_frontend *fe)
printk(KERN_INFO "%s: Waiting for firmware upload(2)...\n", printk(KERN_INFO "%s: Waiting for firmware upload(2)...\n",
__func__); __func__);
if (ret) { if (ret) {
printk(KERN_ERR "%s: No firmware uploaded " printk(KERN_ERR "%s: No firmware uploaded (timeout or file not found?)\n",
"(timeout or file not found?)\n", __func__); __func__);
return ret; return ret;
} }
......
...@@ -474,8 +474,8 @@ static int cx24117_firmware_ondemand(struct dvb_frontend *fe) ...@@ -474,8 +474,8 @@ static int cx24117_firmware_ondemand(struct dvb_frontend *fe)
"%s: Waiting for firmware upload(2)...\n", __func__); "%s: Waiting for firmware upload(2)...\n", __func__);
if (ret) { if (ret) {
dev_err(&state->priv->i2c->dev, dev_err(&state->priv->i2c->dev,
"%s: No firmware uploaded " "%s: No firmware uploaded (timeout or file not found?)\n",
"(timeout or file not found?)\n", __func__); __func__);
return ret; return ret;
} }
......
...@@ -255,8 +255,8 @@ static int cx24123_i2c_writereg(struct cx24123_state *state, ...@@ -255,8 +255,8 @@ static int cx24123_i2c_writereg(struct cx24123_state *state,
err = i2c_transfer(state->i2c, &msg, 1); err = i2c_transfer(state->i2c, &msg, 1);
if (err != 1) { if (err != 1) {
printk("%s: writereg error(err == %i, reg == 0x%02x," printk("%s: writereg error(err == %i, reg == 0x%02x, data == 0x%02x)\n",
" data == 0x%02x)\n", __func__, err, reg, data); __func__, err, reg, data);
return err; return err;
} }
......
...@@ -248,8 +248,8 @@ static int ds3000_writereg(struct ds3000_state *state, int reg, int data) ...@@ -248,8 +248,8 @@ static int ds3000_writereg(struct ds3000_state *state, int reg, int data)
err = i2c_transfer(state->i2c, &msg, 1); err = i2c_transfer(state->i2c, &msg, 1);
if (err != 1) { if (err != 1) {
printk(KERN_ERR "%s: writereg error(err == %i, reg == 0x%02x," printk(KERN_ERR "%s: writereg error(err == %i, reg == 0x%02x, value == 0x%02x)\n",
" value == 0x%02x)\n", __func__, err, reg, data); __func__, err, reg, data);
return -EREMOTEIO; return -EREMOTEIO;
} }
...@@ -296,8 +296,8 @@ static int ds3000_writeFW(struct ds3000_state *state, int reg, ...@@ -296,8 +296,8 @@ static int ds3000_writeFW(struct ds3000_state *state, int reg,
ret = i2c_transfer(state->i2c, &msg, 1); ret = i2c_transfer(state->i2c, &msg, 1);
if (ret != 1) { if (ret != 1) {
printk(KERN_ERR "%s: write error(err == %i, " printk(KERN_ERR "%s: write error(err == %i, reg == 0x%02x\n",
"reg == 0x%02x\n", __func__, ret, reg); __func__, ret, reg);
ret = -EREMOTEIO; ret = -EREMOTEIO;
goto error; goto error;
} }
...@@ -364,8 +364,8 @@ static int ds3000_firmware_ondemand(struct dvb_frontend *fe) ...@@ -364,8 +364,8 @@ static int ds3000_firmware_ondemand(struct dvb_frontend *fe)
state->i2c->dev.parent); state->i2c->dev.parent);
printk(KERN_INFO "%s: Waiting for firmware upload(2)...\n", __func__); printk(KERN_INFO "%s: Waiting for firmware upload(2)...\n", __func__);
if (ret) { if (ret) {
printk(KERN_ERR "%s: No firmware uploaded (timeout or file not " printk(KERN_ERR "%s: No firmware uploaded (timeout or file not found?)\n",
"found?)\n", __func__); __func__);
return ret; return ret;
} }
...@@ -1144,8 +1144,7 @@ static struct dvb_frontend_ops ds3000_ops = { ...@@ -1144,8 +1144,7 @@ static struct dvb_frontend_ops ds3000_ops = {
module_param(debug, int, 0644); module_param(debug, int, 0644);
MODULE_PARM_DESC(debug, "Activates frontend debugging (default:0)"); MODULE_PARM_DESC(debug, "Activates frontend debugging (default:0)");
MODULE_DESCRIPTION("DVB Frontend module for Montage Technology " MODULE_DESCRIPTION("DVB Frontend module for Montage Technology DS3000 hardware");
"DS3000 hardware");
MODULE_AUTHOR("Konstantin Dimitrov <kosio.dimitrov@gmail.com>"); MODULE_AUTHOR("Konstantin Dimitrov <kosio.dimitrov@gmail.com>");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
MODULE_FIRMWARE(DS3000_DEFAULT_FIRMWARE); MODULE_FIRMWARE(DS3000_DEFAULT_FIRMWARE);
...@@ -405,8 +405,7 @@ static int lgdt330x_set_parameters(struct dvb_frontend *fe) ...@@ -405,8 +405,7 @@ static int lgdt330x_set_parameters(struct dvb_frontend *fe)
return -1; return -1;
} }
if (err < 0) if (err < 0)
printk(KERN_WARNING "lgdt330x: %s: error blasting " printk(KERN_WARNING "lgdt330x: %s: error blasting bytes to lgdt3303 for modulation type(%d)\n",
"bytes to lgdt3303 for modulation type(%d)\n",
__func__, p->modulation); __func__, p->modulation);
/* /*
......
...@@ -75,8 +75,8 @@ static int m88rs2000_writereg(struct m88rs2000_state *state, ...@@ -75,8 +75,8 @@ static int m88rs2000_writereg(struct m88rs2000_state *state,
ret = i2c_transfer(state->i2c, &msg, 1); ret = i2c_transfer(state->i2c, &msg, 1);
if (ret != 1) if (ret != 1)
deb_info("%s: writereg error (reg == 0x%02x, val == 0x%02x, " deb_info("%s: writereg error (reg == 0x%02x, val == 0x%02x, ret == %i)\n",
"ret == %i)\n", __func__, reg, data, ret); __func__, reg, data, ret);
return (ret != 1) ? -EREMOTEIO : 0; return (ret != 1) ? -EREMOTEIO : 0;
} }
...@@ -618,10 +618,9 @@ static int m88rs2000_set_frontend(struct dvb_frontend *fe) ...@@ -618,10 +618,9 @@ static int m88rs2000_set_frontend(struct dvb_frontend *fe)
state->no_lock_count = 0; state->no_lock_count = 0;
if (c->delivery_system != SYS_DVBS) { if (c->delivery_system != SYS_DVBS) {
deb_info("%s: unsupported delivery " deb_info("%s: unsupported delivery system selected (%d)\n",
"system selected (%d)\n", __func__, c->delivery_system);
__func__, c->delivery_system); return -EOPNOTSUPP;
return -EOPNOTSUPP;
} }
/* Set Tuner */ /* Set Tuner */
......
...@@ -457,8 +457,8 @@ static int mt312_read_status(struct dvb_frontend *fe, enum fe_status *s) ...@@ -457,8 +457,8 @@ static int mt312_read_status(struct dvb_frontend *fe, enum fe_status *s)
if (ret < 0) if (ret < 0)
return ret; return ret;
dprintk("QPSK_STAT_H: 0x%02x, QPSK_STAT_L: 0x%02x," dprintk("QPSK_STAT_H: 0x%02x, QPSK_STAT_L: 0x%02x, FEC_STATUS: 0x%02x\n",
" FEC_STATUS: 0x%02x\n", status[0], status[1], status[2]); status[0], status[1], status[2]);
if (status[0] & 0xc0) if (status[0] & 0xc0)
*s |= FE_HAS_SIGNAL; /* signal noise ratio */ *s |= FE_HAS_SIGNAL; /* signal noise ratio */
...@@ -827,8 +827,7 @@ struct dvb_frontend *mt312_attach(const struct mt312_config *config, ...@@ -827,8 +827,7 @@ struct dvb_frontend *mt312_attach(const struct mt312_config *config,
state->freq_mult = 9; state->freq_mult = 9;
break; break;
default: default:
printk(KERN_WARNING "Only Zarlink VP310/MT312/ZL10313" printk(KERN_WARNING "Only Zarlink VP310/MT312/ZL10313 are supported chips.\n");
" are supported chips.\n");
goto error; goto error;
} }
......
...@@ -289,8 +289,7 @@ static void nxt200x_microcontroller_stop (struct nxt200x_state* state) ...@@ -289,8 +289,7 @@ static void nxt200x_microcontroller_stop (struct nxt200x_state* state)
counter++; counter++;
} }
pr_warn("Timeout waiting for nxt200x to stop. This is ok after " pr_warn("Timeout waiting for nxt200x to stop. This is ok after firmware upload.\n");
"firmware upload.\n");
return; return;
} }
...@@ -893,8 +892,8 @@ static int nxt2002_init(struct dvb_frontend* fe) ...@@ -893,8 +892,8 @@ static int nxt2002_init(struct dvb_frontend* fe)
state->i2c->dev.parent); state->i2c->dev.parent);
pr_debug("%s: Waiting for firmware upload(2)...\n", __func__); pr_debug("%s: Waiting for firmware upload(2)...\n", __func__);
if (ret) { if (ret) {
pr_err("%s: No firmware uploaded (timeout or file not found?)" pr_err("%s: No firmware uploaded (timeout or file not found?)\n",
"\n", __func__); __func__);
return ret; return ret;
} }
...@@ -960,8 +959,8 @@ static int nxt2004_init(struct dvb_frontend* fe) ...@@ -960,8 +959,8 @@ static int nxt2004_init(struct dvb_frontend* fe)
state->i2c->dev.parent); state->i2c->dev.parent);
pr_debug("%s: Waiting for firmware upload(2)...\n", __func__); pr_debug("%s: Waiting for firmware upload(2)...\n", __func__);
if (ret) { if (ret) {
pr_err("%s: No firmware uploaded (timeout or file not found?)" pr_err("%s: No firmware uploaded (timeout or file not found?)\n",
"\n", __func__); __func__);
return ret; return ret;
} }
......
...@@ -342,15 +342,13 @@ static int or51132_set_parameters(struct dvb_frontend *fe) ...@@ -342,15 +342,13 @@ static int or51132_set_parameters(struct dvb_frontend *fe)
fwname); fwname);
ret = request_firmware(&fw, fwname, state->i2c->dev.parent); ret = request_firmware(&fw, fwname, state->i2c->dev.parent);
if (ret) { if (ret) {
printk(KERN_WARNING "or51132: No firmware up" printk(KERN_WARNING "or51132: No firmware uploaded(timeout or file not found?)\n");
"loaded(timeout or file not found?)\n");
return ret; return ret;
} }
ret = or51132_load_firmware(fe, fw); ret = or51132_load_firmware(fe, fw);
release_firmware(fw); release_firmware(fw);
if (ret) { if (ret) {
printk(KERN_WARNING "or51132: Writing firmware to " printk(KERN_WARNING "or51132: Writing firmware to device failed!\n");
"device failed!\n");
return ret; return ret;
} }
printk("or51132: Firmware upload complete.\n"); printk("or51132: Firmware upload complete.\n");
......
...@@ -377,8 +377,7 @@ static int or51211_init(struct dvb_frontend* fe) ...@@ -377,8 +377,7 @@ static int or51211_init(struct dvb_frontend* fe)
OR51211_DEFAULT_FIRMWARE); OR51211_DEFAULT_FIRMWARE);
pr_info("Got Hotplug firmware\n"); pr_info("Got Hotplug firmware\n");
if (ret) { if (ret) {
pr_warn("No firmware uploaded " pr_warn("No firmware uploaded (timeout or file not found?)\n");
"(timeout or file not found?)\n");
return ret; return ret;
} }
......
...@@ -321,8 +321,8 @@ static int s5h1409_writereg(struct s5h1409_state *state, u8 reg, u16 data) ...@@ -321,8 +321,8 @@ static int s5h1409_writereg(struct s5h1409_state *state, u8 reg, u16 data)
ret = i2c_transfer(state->i2c, &msg, 1); ret = i2c_transfer(state->i2c, &msg, 1);
if (ret != 1) if (ret != 1)
printk(KERN_ERR "%s: error (reg == 0x%02x, val == 0x%04x, " printk(KERN_ERR "%s: error (reg == 0x%02x, val == 0x%04x, ret == %i)\n",
"ret == %i)\n", __func__, reg, data, ret); __func__, reg, data, ret);
return (ret != 1) ? -1 : 0; return (ret != 1) ? -1 : 0;
} }
......
...@@ -350,8 +350,8 @@ static int s5h1411_writereg(struct s5h1411_state *state, ...@@ -350,8 +350,8 @@ static int s5h1411_writereg(struct s5h1411_state *state,
ret = i2c_transfer(state->i2c, &msg, 1); ret = i2c_transfer(state->i2c, &msg, 1);
if (ret != 1) if (ret != 1)
printk(KERN_ERR "%s: writereg error 0x%02x 0x%02x 0x%04x, " printk(KERN_ERR "%s: writereg error 0x%02x 0x%02x 0x%04x, ret == %i)\n",
"ret == %i)\n", __func__, addr, reg, data, ret); __func__, addr, reg, data, ret);
return (ret != 1) ? -1 : 0; return (ret != 1) ? -1 : 0;
} }
......
...@@ -63,8 +63,8 @@ static int s5h1432_writereg(struct s5h1432_state *state, ...@@ -63,8 +63,8 @@ static int s5h1432_writereg(struct s5h1432_state *state,
ret = i2c_transfer(state->i2c, &msg, 1); ret = i2c_transfer(state->i2c, &msg, 1);
if (ret != 1) if (ret != 1)
printk(KERN_ERR "%s: writereg error 0x%02x 0x%02x 0x%04x, " printk(KERN_ERR "%s: writereg error 0x%02x 0x%02x 0x%04x, ret == %i)\n",
"ret == %i)\n", __func__, addr, reg, data, ret); __func__, addr, reg, data, ret);
return (ret != 1) ? -1 : 0; return (ret != 1) ? -1 : 0;
} }
......
...@@ -214,8 +214,8 @@ static int s921_i2c_writereg(struct s921_state *state, ...@@ -214,8 +214,8 @@ static int s921_i2c_writereg(struct s921_state *state,
rc = i2c_transfer(state->i2c, &msg, 1); rc = i2c_transfer(state->i2c, &msg, 1);
if (rc != 1) { if (rc != 1) {
printk("%s: writereg rcor(rc == %i, reg == 0x%02x," printk("%s: writereg rcor(rc == %i, reg == 0x%02x, data == 0x%02x)\n",
" data == 0x%02x)\n", __func__, rc, reg, data); __func__, rc, reg, data);
return rc; return rc;
} }
......
...@@ -245,8 +245,8 @@ static int si21_writeregs(struct si21xx_state *state, u8 reg1, ...@@ -245,8 +245,8 @@ static int si21_writeregs(struct si21xx_state *state, u8 reg1,
ret = i2c_transfer(state->i2c, &msg, 1); ret = i2c_transfer(state->i2c, &msg, 1);
if (ret != 1) if (ret != 1)
dprintk("%s: writereg error (reg1 == 0x%02x, data == 0x%02x, " dprintk("%s: writereg error (reg1 == 0x%02x, data == 0x%02x, ret == %i)\n",
"ret == %i)\n", __func__, reg1, data[0], ret); __func__, reg1, data[0], ret);
return (ret != 1) ? -EREMOTEIO : 0; return (ret != 1) ? -EREMOTEIO : 0;
} }
...@@ -265,8 +265,8 @@ static int si21_writereg(struct si21xx_state *state, u8 reg, u8 data) ...@@ -265,8 +265,8 @@ static int si21_writereg(struct si21xx_state *state, u8 reg, u8 data)
ret = i2c_transfer(state->i2c, &msg, 1); ret = i2c_transfer(state->i2c, &msg, 1);
if (ret != 1) if (ret != 1)
dprintk("%s: writereg error (reg == 0x%02x, data == 0x%02x, " dprintk("%s: writereg error (reg == 0x%02x, data == 0x%02x, ret == %i)\n",
"ret == %i)\n", __func__, reg, data, ret); __func__, reg, data, ret);
return (ret != 1) ? -EREMOTEIO : 0; return (ret != 1) ? -EREMOTEIO : 0;
} }
......
...@@ -63,8 +63,7 @@ static int sp887x_writereg (struct sp887x_state* state, u16 reg, u16 data) ...@@ -63,8 +63,7 @@ static int sp887x_writereg (struct sp887x_state* state, u16 reg, u16 data)
if (!(reg == 0xf1a && data == 0x000 && if (!(reg == 0xf1a && data == 0x000 &&
(ret == -EREMOTEIO || ret == -EFAULT))) (ret == -EREMOTEIO || ret == -EFAULT)))
{ {
printk("%s: writereg error " printk("%s: writereg error (reg %03x, data %03x, ret == %i)\n",
"(reg %03x, data %03x, ret == %i)\n",
__func__, reg & 0xffff, data & 0xffff, ret); __func__, reg & 0xffff, data & 0xffff, ret);
return ret; return ret;
} }
......
...@@ -74,8 +74,8 @@ static int stv0288_writeregI(struct stv0288_state *state, u8 reg, u8 data) ...@@ -74,8 +74,8 @@ static int stv0288_writeregI(struct stv0288_state *state, u8 reg, u8 data)
ret = i2c_transfer(state->i2c, &msg, 1); ret = i2c_transfer(state->i2c, &msg, 1);
if (ret != 1) if (ret != 1)
dprintk("%s: writereg error (reg == 0x%02x, val == 0x%02x, " dprintk("%s: writereg error (reg == 0x%02x, val == 0x%02x, ret == %i)\n",
"ret == %i)\n", __func__, reg, data, ret); __func__, reg, data, ret);
return (ret != 1) ? -EREMOTEIO : 0; return (ret != 1) ? -EREMOTEIO : 0;
} }
...@@ -465,10 +465,9 @@ static int stv0288_set_frontend(struct dvb_frontend *fe) ...@@ -465,10 +465,9 @@ static int stv0288_set_frontend(struct dvb_frontend *fe)
dprintk("%s : FE_SET_FRONTEND\n", __func__); dprintk("%s : FE_SET_FRONTEND\n", __func__);
if (c->delivery_system != SYS_DVBS) { if (c->delivery_system != SYS_DVBS) {
dprintk("%s: unsupported delivery " dprintk("%s: unsupported delivery system selected (%d)\n",
"system selected (%d)\n", __func__, c->delivery_system);
__func__, c->delivery_system); return -EOPNOTSUPP;
return -EOPNOTSUPP;
} }
if (state->config->set_ts_params) if (state->config->set_ts_params)
......
...@@ -57,8 +57,8 @@ static int stv0297_writereg(struct stv0297_state *state, u8 reg, u8 data) ...@@ -57,8 +57,8 @@ static int stv0297_writereg(struct stv0297_state *state, u8 reg, u8 data)
ret = i2c_transfer(state->i2c, &msg, 1); ret = i2c_transfer(state->i2c, &msg, 1);
if (ret != 1) if (ret != 1)
dprintk("%s: writereg error (reg == 0x%02x, val == 0x%02x, " dprintk("%s: writereg error (reg == 0x%02x, val == 0x%02x, ret == %i)\n",
"ret == %i)\n", __func__, reg, data, ret); __func__, reg, data, ret);
return (ret != 1) ? -1 : 0; return (ret != 1) ? -1 : 0;
} }
......
...@@ -88,8 +88,8 @@ static int stv0299_writeregI (struct stv0299_state* state, u8 reg, u8 data) ...@@ -88,8 +88,8 @@ static int stv0299_writeregI (struct stv0299_state* state, u8 reg, u8 data)
ret = i2c_transfer (state->i2c, &msg, 1); ret = i2c_transfer (state->i2c, &msg, 1);
if (ret != 1) if (ret != 1)
dprintk("%s: writereg error (reg == 0x%02x, val == 0x%02x, " dprintk("%s: writereg error (reg == 0x%02x, val == 0x%02x, ret == %i)\n",
"ret == %i)\n", __func__, reg, data, ret); __func__, reg, data, ret);
return (ret != 1) ? -EREMOTEIO : 0; return (ret != 1) ? -EREMOTEIO : 0;
} }
...@@ -761,8 +761,7 @@ module_param(debug, int, 0644); ...@@ -761,8 +761,7 @@ module_param(debug, int, 0644);
MODULE_PARM_DESC(debug, "Turn on/off frontend debugging (default:off)."); MODULE_PARM_DESC(debug, "Turn on/off frontend debugging (default:off).");
MODULE_DESCRIPTION("ST STV0299 DVB Demodulator driver"); MODULE_DESCRIPTION("ST STV0299 DVB Demodulator driver");
MODULE_AUTHOR("Ralph Metzler, Holger Waechtler, Peter Schildmann, Felix Domke, " MODULE_AUTHOR("Ralph Metzler, Holger Waechtler, Peter Schildmann, Felix Domke, Andreas Oberritter, Andrew de Quincey, Kenneth Aafly");
"Andreas Oberritter, Andrew de Quincey, Kenneth Aafly");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
EXPORT_SYMBOL(stv0299_attach); EXPORT_SYMBOL(stv0299_attach);
...@@ -1485,8 +1485,7 @@ static u32 stv0900_search_srate_coarse(struct dvb_frontend *fe) ...@@ -1485,8 +1485,7 @@ static u32 stv0900_search_srate_coarse(struct dvb_frontend *fe)
current_step++; current_step++;
direction *= -1; direction *= -1;
dprintk("lock: I2C_DEMOD_MODE_FIELD =0. Search started." dprintk("lock: I2C_DEMOD_MODE_FIELD =0. Search started. tuner freq=%d agc2=0x%x srate_coarse=%d tmg_cpt=%d\n",
" tuner freq=%d agc2=0x%x srate_coarse=%d tmg_cpt=%d\n",
tuner_freq, agc2_integr, coarse_srate, timingcpt); tuner_freq, agc2_integr, coarse_srate, timingcpt);
if ((timingcpt >= 5) && if ((timingcpt >= 5) &&
......
...@@ -77,8 +77,7 @@ static int _tda10021_writereg (struct tda10021_state* state, u8 reg, u8 data) ...@@ -77,8 +77,7 @@ static int _tda10021_writereg (struct tda10021_state* state, u8 reg, u8 data)
ret = i2c_transfer (state->i2c, &msg, 1); ret = i2c_transfer (state->i2c, &msg, 1);
if (ret != 1) if (ret != 1)
printk("DVB: TDA10021(%d): %s, writereg error " printk("DVB: TDA10021(%d): %s, writereg error (reg == 0x%02x, val == 0x%02x, ret == %i)\n",
"(reg == 0x%02x, val == 0x%02x, ret == %i)\n",
state->frontend.dvb->num, __func__, reg, data, ret); state->frontend.dvb->num, __func__, reg, data, ret);
msleep(10); msleep(10);
......
...@@ -72,8 +72,7 @@ static u8 tda10023_readreg (struct tda10023_state* state, u8 reg) ...@@ -72,8 +72,7 @@ static u8 tda10023_readreg (struct tda10023_state* state, u8 reg)
ret = i2c_transfer (state->i2c, msg, 2); ret = i2c_transfer (state->i2c, msg, 2);
if (ret != 2) { if (ret != 2) {
int num = state->frontend.dvb ? state->frontend.dvb->num : -1; int num = state->frontend.dvb ? state->frontend.dvb->num : -1;
printk(KERN_ERR "DVB: TDA10023(%d): %s: readreg error " printk(KERN_ERR "DVB: TDA10023(%d): %s: readreg error (reg == 0x%02x, ret == %i)\n",
"(reg == 0x%02x, ret == %i)\n",
num, __func__, reg, ret); num, __func__, reg, ret);
} }
return b1[0]; return b1[0];
...@@ -88,8 +87,7 @@ static int tda10023_writereg (struct tda10023_state* state, u8 reg, u8 data) ...@@ -88,8 +87,7 @@ static int tda10023_writereg (struct tda10023_state* state, u8 reg, u8 data)
ret = i2c_transfer (state->i2c, &msg, 1); ret = i2c_transfer (state->i2c, &msg, 1);
if (ret != 1) { if (ret != 1) {
int num = state->frontend.dvb ? state->frontend.dvb->num : -1; int num = state->frontend.dvb ? state->frontend.dvb->num : -1;
printk(KERN_ERR "DVB: TDA10023(%d): %s, writereg error " printk(KERN_ERR "DVB: TDA10023(%d): %s, writereg error (reg == 0x%02x, val == 0x%02x, ret == %i)\n",
"(reg == 0x%02x, val == 0x%02x, ret == %i)\n",
num, __func__, reg, data, ret); num, __func__, reg, data, ret);
} }
return (ret != 1) ? -EREMOTEIO : 0; return (ret != 1) ? -EREMOTEIO : 0;
......
...@@ -1063,32 +1063,28 @@ static void tda10048_establish_defaults(struct dvb_frontend *fe) ...@@ -1063,32 +1063,28 @@ static void tda10048_establish_defaults(struct dvb_frontend *fe)
/* Validate/default the config */ /* Validate/default the config */
if (config->dtv6_if_freq_khz == 0) { if (config->dtv6_if_freq_khz == 0) {
config->dtv6_if_freq_khz = TDA10048_IF_4300; config->dtv6_if_freq_khz = TDA10048_IF_4300;
printk(KERN_WARNING "%s() tda10048_config.dtv6_if_freq_khz " printk(KERN_WARNING "%s() tda10048_config.dtv6_if_freq_khz is not set (defaulting to %d)\n",
"is not set (defaulting to %d)\n",
__func__, __func__,
config->dtv6_if_freq_khz); config->dtv6_if_freq_khz);
} }
if (config->dtv7_if_freq_khz == 0) { if (config->dtv7_if_freq_khz == 0) {
config->dtv7_if_freq_khz = TDA10048_IF_4300; config->dtv7_if_freq_khz = TDA10048_IF_4300;
printk(KERN_WARNING "%s() tda10048_config.dtv7_if_freq_khz " printk(KERN_WARNING "%s() tda10048_config.dtv7_if_freq_khz is not set (defaulting to %d)\n",
"is not set (defaulting to %d)\n",
__func__, __func__,
config->dtv7_if_freq_khz); config->dtv7_if_freq_khz);
} }
if (config->dtv8_if_freq_khz == 0) { if (config->dtv8_if_freq_khz == 0) {
config->dtv8_if_freq_khz = TDA10048_IF_4300; config->dtv8_if_freq_khz = TDA10048_IF_4300;
printk(KERN_WARNING "%s() tda10048_config.dtv8_if_freq_khz " printk(KERN_WARNING "%s() tda10048_config.dtv8_if_freq_khz is not set (defaulting to %d)\n",
"is not set (defaulting to %d)\n",
__func__, __func__,
config->dtv8_if_freq_khz); config->dtv8_if_freq_khz);
} }
if (config->clk_freq_khz == 0) { if (config->clk_freq_khz == 0) {
config->clk_freq_khz = TDA10048_CLK_16000; config->clk_freq_khz = TDA10048_CLK_16000;
printk(KERN_WARNING "%s() tda10048_config.clk_freq_khz " printk(KERN_WARNING "%s() tda10048_config.clk_freq_khz is not set (defaulting to %d)\n",
"is not set (defaulting to %d)\n",
__func__, __func__,
config->clk_freq_khz); config->clk_freq_khz);
} }
......
...@@ -65,8 +65,8 @@ static int ves1820_writereg(struct ves1820_state *state, u8 reg, u8 data) ...@@ -65,8 +65,8 @@ static int ves1820_writereg(struct ves1820_state *state, u8 reg, u8 data)
ret = i2c_transfer(state->i2c, &msg, 1); ret = i2c_transfer(state->i2c, &msg, 1);
if (ret != 1) if (ret != 1)
printk("ves1820: %s(): writereg error (reg == 0x%02x, " printk("ves1820: %s(): writereg error (reg == 0x%02x, val == 0x%02x, ret == %i)\n",
"val == 0x%02x, ret == %i)\n", __func__, reg, data, ret); __func__, reg, data, ret);
return (ret != 1) ? -EREMOTEIO : 0; return (ret != 1) ? -EREMOTEIO : 0;
} }
...@@ -84,8 +84,8 @@ static u8 ves1820_readreg(struct ves1820_state *state, u8 reg) ...@@ -84,8 +84,8 @@ static u8 ves1820_readreg(struct ves1820_state *state, u8 reg)
ret = i2c_transfer(state->i2c, msg, 2); ret = i2c_transfer(state->i2c, msg, 2);
if (ret != 2) if (ret != 2)
printk("ves1820: %s(): readreg error (reg == 0x%02x, " printk("ves1820: %s(): readreg error (reg == 0x%02x, ret == %i)\n",
"ret == %i)\n", __func__, reg, ret); __func__, reg, ret);
return b1[0]; return b1[0];
} }
......
...@@ -85,8 +85,8 @@ static int zl10036_read_status_reg(struct zl10036_state *state) ...@@ -85,8 +85,8 @@ static int zl10036_read_status_reg(struct zl10036_state *state)
deb_i2c("R(status): %02x [FL=%d]\n", status, deb_i2c("R(status): %02x [FL=%d]\n", status,
(status & STATUS_FL) ? 1 : 0); (status & STATUS_FL) ? 1 : 0);
if (status & STATUS_POR) if (status & STATUS_POR)
deb_info("%s: Power-On-Reset bit enabled - " deb_info("%s: Power-On-Reset bit enabled - need to initialize the tuner\n",
"need to initialize the tuner\n", __func__); __func__);
return status; return status;
} }
......
...@@ -152,8 +152,7 @@ static int zl10039_init(struct dvb_frontend *fe) ...@@ -152,8 +152,7 @@ static int zl10039_init(struct dvb_frontend *fe)
/* Reset logic */ /* Reset logic */
ret = zl10039_writereg(state, GENERAL, 0x40); ret = zl10039_writereg(state, GENERAL, 0x40);
if (ret < 0) { if (ret < 0) {
dprintk("Note: i2c write error normal when resetting the " dprintk("Note: i2c write error normal when resetting the tuner\n");
"tuner\n");
} }
/* Wake up */ /* Wake up */
ret = zl10039_writereg(state, GENERAL, 0x01); ret = zl10039_writereg(state, GENERAL, 0x01);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment