linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/4] dw2102: remove unnecessary printing of MAC address
@ 2015-05-05 16:33 Olli Salonen
  2015-05-05 16:33 ` [PATCH 2/4] dw2102: remove unnecessary newline from log printouts Olli Salonen
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Olli Salonen @ 2015-05-05 16:33 UTC (permalink / raw)
  To: linux-media; +Cc: Olli Salonen

While reading the MAC address for SU3000-based devices the system was
printing excessive debug information in the logs:

Output before the patch:

[ 1515.780692] bc 00 00 00 00 00
[ 1515.781440] bc ea 00 00 00 00
[ 1515.782251] bc ea 2b 00 00 00
[ 1515.783094] bc ea 2b 46 00 00
[ 1515.783816] bc ea 2b 46 12 00
[ 1515.784565] bc ea 2b 46 12 92
[ 1515.784571] dvb-usb: MAC address: bc:ea:2b:46:12:92

Output after the patch:

[ 3803.495706] dvb-usb: MAC address: bc:ea:2b:46:12:92

Signed-off-by: Olli Salonen <olli.salonen@iki.fi>
---
 drivers/media/usb/dvb-usb/dw2102.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/media/usb/dvb-usb/dw2102.c b/drivers/media/usb/dvb-usb/dw2102.c
index 28fd6ba..4ad6bb2 100644
--- a/drivers/media/usb/dvb-usb/dw2102.c
+++ b/drivers/media/usb/dvb-usb/dw2102.c
@@ -928,8 +928,6 @@ static int su3000_read_mac_address(struct dvb_usb_device *d, u8 mac[6])
 			break;
 		else
 			mac[i] = ibuf[0];
-
-		debug_dump(mac, 6, printk);
 	}
 
 	return 0;
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/4] dw2102: remove unnecessary newline from log printouts
  2015-05-05 16:33 [PATCH 1/4] dw2102: remove unnecessary printing of MAC address Olli Salonen
@ 2015-05-05 16:33 ` Olli Salonen
  2015-05-13 20:10   ` Mauro Carvalho Chehab
  2015-05-05 16:33 ` [PATCH 3/4] dw2102: debugging improvements Olli Salonen
  2015-05-05 16:33 ` [PATCH 4/4] dw2102: resync fifo when demod locks Olli Salonen
  2 siblings, 1 reply; 5+ messages in thread
From: Olli Salonen @ 2015-05-05 16:33 UTC (permalink / raw)
  To: linux-media; +Cc: Olli Salonen

The info and warn functions already add a newline to the end of the
log printouts, so remove the extra newline from the printouts.

Signed-off-by: Olli Salonen <olli.salonen@iki.fi>
---
 drivers/media/usb/dvb-usb/dw2102.c | 60 +++++++++++++++++++-------------------
 1 file changed, 30 insertions(+), 30 deletions(-)

diff --git a/drivers/media/usb/dvb-usb/dw2102.c b/drivers/media/usb/dvb-usb/dw2102.c
index 4ad6bb2..b1f8a3f 100644
--- a/drivers/media/usb/dvb-usb/dw2102.c
+++ b/drivers/media/usb/dvb-usb/dw2102.c
@@ -307,7 +307,7 @@ static int dw2102_earda_i2c_transfer(struct i2c_adapter *adap, struct i2c_msg ms
 		u8 ibuf[MAX_XFER_SIZE], obuf[3];
 
 		if (2 + msg[1].len > sizeof(ibuf)) {
-			warn("i2c rd: len=%d is too big!\n",
+			warn("i2c rd: len=%d is too big!",
 			     msg[1].len);
 			ret = -EOPNOTSUPP;
 			goto unlock;
@@ -332,7 +332,7 @@ static int dw2102_earda_i2c_transfer(struct i2c_adapter *adap, struct i2c_msg ms
 			u8 obuf[MAX_XFER_SIZE];
 
 			if (2 + msg[0].len > sizeof(obuf)) {
-				warn("i2c wr: len=%d is too big!\n",
+				warn("i2c wr: len=%d is too big!",
 				     msg[1].len);
 				ret = -EOPNOTSUPP;
 				goto unlock;
@@ -350,7 +350,7 @@ static int dw2102_earda_i2c_transfer(struct i2c_adapter *adap, struct i2c_msg ms
 			u8 obuf[MAX_XFER_SIZE];
 
 			if (2 + msg[0].len > sizeof(obuf)) {
-				warn("i2c wr: len=%d is too big!\n",
+				warn("i2c wr: len=%d is too big!",
 				     msg[1].len);
 				ret = -EOPNOTSUPP;
 				goto unlock;
@@ -426,7 +426,7 @@ static int dw2104_i2c_transfer(struct i2c_adapter *adap, struct i2c_msg msg[], i
 				u8  ibuf[MAX_XFER_SIZE];
 
 				if (2 + msg[j].len > sizeof(ibuf)) {
-					warn("i2c rd: len=%d is too big!\n",
+					warn("i2c rd: len=%d is too big!",
 					     msg[j].len);
 					ret = -EOPNOTSUPP;
 					goto unlock;
@@ -463,7 +463,7 @@ static int dw2104_i2c_transfer(struct i2c_adapter *adap, struct i2c_msg msg[], i
 				u8 obuf[MAX_XFER_SIZE];
 
 				if (2 + msg[j].len > sizeof(obuf)) {
-					warn("i2c wr: len=%d is too big!\n",
+					warn("i2c wr: len=%d is too big!",
 					     msg[j].len);
 					ret = -EOPNOTSUPP;
 					goto unlock;
@@ -507,7 +507,7 @@ static int dw3101_i2c_transfer(struct i2c_adapter *adap, struct i2c_msg msg[],
 		u8 ibuf[MAX_XFER_SIZE], obuf[3];
 
 		if (2 + msg[1].len > sizeof(ibuf)) {
-			warn("i2c rd: len=%d is too big!\n",
+			warn("i2c rd: len=%d is too big!",
 			     msg[1].len);
 			ret = -EOPNOTSUPP;
 			goto unlock;
@@ -532,7 +532,7 @@ static int dw3101_i2c_transfer(struct i2c_adapter *adap, struct i2c_msg msg[],
 			u8 obuf[MAX_XFER_SIZE];
 
 			if (2 + msg[0].len > sizeof(obuf)) {
-				warn("i2c wr: len=%d is too big!\n",
+				warn("i2c wr: len=%d is too big!",
 				     msg[0].len);
 				ret = -EOPNOTSUPP;
 				goto unlock;
@@ -623,7 +623,7 @@ static int s6x0_i2c_transfer(struct i2c_adapter *adap, struct i2c_msg msg[],
 				u8 ibuf[MAX_XFER_SIZE];
 
 				if (msg[j].len > sizeof(ibuf)) {
-					warn("i2c rd: len=%d is too big!\n",
+					warn("i2c rd: len=%d is too big!",
 					     msg[j].len);
 					ret = -EOPNOTSUPP;
 					goto unlock;
@@ -658,7 +658,7 @@ static int s6x0_i2c_transfer(struct i2c_adapter *adap, struct i2c_msg msg[],
 				u8 obuf[MAX_XFER_SIZE];
 
 				if (2 + msg[j].len > sizeof(obuf)) {
-					warn("i2c wr: len=%d is too big!\n",
+					warn("i2c wr: len=%d is too big!",
 					     msg[j].len);
 					ret = -EOPNOTSUPP;
 					goto unlock;
@@ -678,7 +678,7 @@ static int s6x0_i2c_transfer(struct i2c_adapter *adap, struct i2c_msg msg[],
 				u8 obuf[MAX_XFER_SIZE];
 
 				if (2 + msg[j].len > sizeof(obuf)) {
-					warn("i2c wr: len=%d is too big!\n",
+					warn("i2c wr: len=%d is too big!",
 					     msg[j].len);
 					ret = -EOPNOTSUPP;
 					goto unlock;
@@ -891,7 +891,7 @@ static int su3000_power_ctrl(struct dvb_usb_device *d, int i)
 	struct dw2102_state *state = (struct dw2102_state *)d->priv;
 	u8 obuf[] = {0xde, 0};
 
-	info("%s: %d, initialized %d\n", __func__, i, state->initialized);
+	info("%s: %d, initialized %d", __func__, i, state->initialized);
 
 	if (i && !state->initialized) {
 		state->initialized = 1;
@@ -938,7 +938,7 @@ static int su3000_identify_state(struct usb_device *udev,
 				 struct dvb_usb_device_description **desc,
 				 int *cold)
 {
-	info("%s\n", __func__);
+	info("%s", __func__);
 
 	*cold = 0;
 	return 0;
@@ -1172,7 +1172,7 @@ static int dw2104_frontend_attach(struct dvb_usb_adapter *d)
 				tuner_ops->set_bandwidth = stb6100_set_bandw;
 				tuner_ops->get_bandwidth = stb6100_get_bandw;
 				d->fe_adap[0].fe->ops.set_voltage = dw210x_set_voltage;
-				info("Attached STV0900+STB6100!\n");
+				info("Attached STV0900+STB6100!");
 				return 0;
 			}
 		}
@@ -1186,7 +1186,7 @@ static int dw2104_frontend_attach(struct dvb_usb_adapter *d)
 					&dw2104_stv6110_config,
 					&d->dev->i2c_adap)) {
 				d->fe_adap[0].fe->ops.set_voltage = dw210x_set_voltage;
-				info("Attached STV0900+STV6110A!\n");
+				info("Attached STV0900+STV6110A!");
 				return 0;
 			}
 		}
@@ -1197,7 +1197,7 @@ static int dw2104_frontend_attach(struct dvb_usb_adapter *d)
 				&d->dev->i2c_adap);
 		if (d->fe_adap[0].fe != NULL) {
 			d->fe_adap[0].fe->ops.set_voltage = dw210x_set_voltage;
-			info("Attached cx24116!\n");
+			info("Attached cx24116!");
 			return 0;
 		}
 	}
@@ -1208,7 +1208,7 @@ static int dw2104_frontend_attach(struct dvb_usb_adapter *d)
 		dvb_attach(ts2020_attach, d->fe_adap[0].fe,
 			&dw2104_ts2020_config, &d->dev->i2c_adap);
 		d->fe_adap[0].fe->ops.set_voltage = dw210x_set_voltage;
-		info("Attached DS3000!\n");
+		info("Attached DS3000!");
 		return 0;
 	}
 
@@ -1227,7 +1227,7 @@ static int dw2102_frontend_attach(struct dvb_usb_adapter *d)
 					&d->dev->i2c_adap);
 		if (d->fe_adap[0].fe != NULL) {
 			d->fe_adap[0].fe->ops.set_voltage = dw210x_set_voltage;
-			info("Attached si21xx!\n");
+			info("Attached si21xx!");
 			return 0;
 		}
 	}
@@ -1239,7 +1239,7 @@ static int dw2102_frontend_attach(struct dvb_usb_adapter *d)
 			if (dvb_attach(stb6000_attach, d->fe_adap[0].fe, 0x61,
 					&d->dev->i2c_adap)) {
 				d->fe_adap[0].fe->ops.set_voltage = dw210x_set_voltage;
-				info("Attached stv0288!\n");
+				info("Attached stv0288!");
 				return 0;
 			}
 		}
@@ -1251,7 +1251,7 @@ static int dw2102_frontend_attach(struct dvb_usb_adapter *d)
 					&d->dev->i2c_adap);
 		if (d->fe_adap[0].fe != NULL) {
 			d->fe_adap[0].fe->ops.set_voltage = dw210x_set_voltage;
-			info("Attached stv0299!\n");
+			info("Attached stv0299!");
 			return 0;
 		}
 	}
@@ -1263,7 +1263,7 @@ static int dw3101_frontend_attach(struct dvb_usb_adapter *d)
 	d->fe_adap[0].fe = dvb_attach(tda10023_attach, &dw3101_tda10023_config,
 				&d->dev->i2c_adap, 0x48);
 	if (d->fe_adap[0].fe != NULL) {
-		info("Attached tda10023!\n");
+		info("Attached tda10023!");
 		return 0;
 	}
 	return -EIO;
@@ -1277,7 +1277,7 @@ static int zl100313_frontend_attach(struct dvb_usb_adapter *d)
 		if (dvb_attach(zl10039_attach, d->fe_adap[0].fe, 0x60,
 				&d->dev->i2c_adap)) {
 			d->fe_adap[0].fe->ops.set_voltage = dw210x_set_voltage;
-			info("Attached zl100313+zl10039!\n");
+			info("Attached zl100313+zl10039!");
 			return 0;
 		}
 	}
@@ -1302,7 +1302,7 @@ static int stv0288_frontend_attach(struct dvb_usb_adapter *d)
 
 	dw210x_op_rw(d->dev->udev, 0x8a, 0, 0, obuf, 2, DW210X_WRITE_MSG);
 
-	info("Attached stv0288+stb6000!\n");
+	info("Attached stv0288+stb6000!");
 
 	return 0;
 
@@ -1327,7 +1327,7 @@ static int ds3000_frontend_attach(struct dvb_usb_adapter *d)
 
 	dw210x_op_rw(d->dev->udev, 0x8a, 0, 0, obuf, 2, DW210X_WRITE_MSG);
 
-	info("Attached ds3000+ts2020!\n");
+	info("Attached ds3000+ts2020!");
 
 	return 0;
 }
@@ -1345,7 +1345,7 @@ static int prof_7500_frontend_attach(struct dvb_usb_adapter *d)
 
 	dw210x_op_rw(d->dev->udev, 0x8a, 0, 0, obuf, 2, DW210X_WRITE_MSG);
 
-	info("Attached STV0900+STB6100A!\n");
+	info("Attached STV0900+STB6100A!");
 
 	return 0;
 }
@@ -1393,11 +1393,11 @@ static int su3000_frontend_attach(struct dvb_usb_adapter *d)
 	if (dvb_attach(ts2020_attach, d->fe_adap[0].fe,
 				&dw2104_ts2020_config,
 				&d->dev->i2c_adap)) {
-		info("Attached DS3000/TS2020!\n");
+		info("Attached DS3000/TS2020!");
 		return 0;
 	}
 
-	info("Failed to attach DS3000/TS2020!\n");
+	info("Failed to attach DS3000/TS2020!");
 	return -EIO;
 }
 
@@ -1442,12 +1442,12 @@ static int t220_frontend_attach(struct dvb_usb_adapter *d)
 	if (d->fe_adap[0].fe != NULL) {
 		if (dvb_attach(tda18271_attach, d->fe_adap[0].fe, 0x60,
 					&d->dev->i2c_adap, &tda18271_config)) {
-			info("Attached TDA18271HD/CXD2820R!\n");
+			info("Attached TDA18271HD/CXD2820R!");
 			return 0;
 		}
 	}
 
-	info("Failed to attach TDA18271HD/CXD2820R!\n");
+	info("Failed to attach TDA18271HD/CXD2820R!");
 	return -EIO;
 }
 
@@ -1468,11 +1468,11 @@ static int m88rs2000_frontend_attach(struct dvb_usb_adapter *d)
 	if (dvb_attach(ts2020_attach, d->fe_adap[0].fe,
 				&dw2104_ts2020_config,
 				&d->dev->i2c_adap)) {
-		info("Attached RS2000/TS2020!\n");
+		info("Attached RS2000/TS2020!");
 		return 0;
 	}
 
-	info("Failed to attach RS2000/TS2020!\n");
+	info("Failed to attach RS2000/TS2020!");
 	return -EIO;
 }
 
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 3/4] dw2102: debugging improvements
  2015-05-05 16:33 [PATCH 1/4] dw2102: remove unnecessary printing of MAC address Olli Salonen
  2015-05-05 16:33 ` [PATCH 2/4] dw2102: remove unnecessary newline from log printouts Olli Salonen
@ 2015-05-05 16:33 ` Olli Salonen
  2015-05-05 16:33 ` [PATCH 4/4] dw2102: resync fifo when demod locks Olli Salonen
  2 siblings, 0 replies; 5+ messages in thread
From: Olli Salonen @ 2015-05-05 16:33 UTC (permalink / raw)
  To: linux-media; +Cc: Olli Salonen

Move some info printouts to be debugging printouts that are only shown
if debugging for the module is enabled. The module already implemented
deb_rc and deb_xfer, but not deb_info.

Signed-off-by: Olli Salonen <olli.salonen@iki.fi>
---
 drivers/media/usb/dvb-usb/dw2102.c | 6 ++++--
 drivers/media/usb/dvb-usb/dw2102.h | 1 +
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/media/usb/dvb-usb/dw2102.c b/drivers/media/usb/dvb-usb/dw2102.c
index b1f8a3f..7552521 100644
--- a/drivers/media/usb/dvb-usb/dw2102.c
+++ b/drivers/media/usb/dvb-usb/dw2102.c
@@ -881,6 +881,8 @@ static int su3000_streaming_ctrl(struct dvb_usb_adapter *adap, int onoff)
 		.len = 1
 	};
 
+	deb_info("%s: onoff: %d\n", __func__, onoff);
+
 	i2c_transfer(&adap->dev->i2c_adap, &msg, 1);
 
 	return 0;
@@ -891,7 +893,7 @@ static int su3000_power_ctrl(struct dvb_usb_device *d, int i)
 	struct dw2102_state *state = (struct dw2102_state *)d->priv;
 	u8 obuf[] = {0xde, 0};
 
-	info("%s: %d, initialized %d", __func__, i, state->initialized);
+	deb_info("%s: %d, initialized %d\n", __func__, i, state->initialized);
 
 	if (i && !state->initialized) {
 		state->initialized = 1;
@@ -938,7 +940,7 @@ static int su3000_identify_state(struct usb_device *udev,
 				 struct dvb_usb_device_description **desc,
 				 int *cold)
 {
-	info("%s", __func__);
+	deb_info("%s\n", __func__);
 
 	*cold = 0;
 	return 0;
diff --git a/drivers/media/usb/dvb-usb/dw2102.h b/drivers/media/usb/dvb-usb/dw2102.h
index 5cd0b0e..1602368 100644
--- a/drivers/media/usb/dvb-usb/dw2102.h
+++ b/drivers/media/usb/dvb-usb/dw2102.h
@@ -4,6 +4,7 @@
 #define DVB_USB_LOG_PREFIX "dw2102"
 #include "dvb-usb.h"
 
+#define deb_info(args...) dprintk(dvb_usb_dw2102_debug, 0x01, args)
 #define deb_xfer(args...) dprintk(dvb_usb_dw2102_debug, 0x02, args)
 #define deb_rc(args...)   dprintk(dvb_usb_dw2102_debug, 0x04, args)
 #endif
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 4/4] dw2102: resync fifo when demod locks
  2015-05-05 16:33 [PATCH 1/4] dw2102: remove unnecessary printing of MAC address Olli Salonen
  2015-05-05 16:33 ` [PATCH 2/4] dw2102: remove unnecessary newline from log printouts Olli Salonen
  2015-05-05 16:33 ` [PATCH 3/4] dw2102: debugging improvements Olli Salonen
@ 2015-05-05 16:33 ` Olli Salonen
  2 siblings, 0 replies; 5+ messages in thread
From: Olli Salonen @ 2015-05-05 16:33 UTC (permalink / raw)
  To: linux-media; +Cc: Olli Salonen

If the streaming_ctrl is called to enable TS before demod has locked
the TS will be empty. Copied the solution from the dvbsky driver for the
TechnoTrend S2-4600 device: when the state changes from unlock to
lock, call su3000_streaming_ctrl again.

Signed-off-by: Olli Salonen <olli.salonen@iki.fi>
---
 drivers/media/usb/dvb-usb/dw2102.c | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/drivers/media/usb/dvb-usb/dw2102.c b/drivers/media/usb/dvb-usb/dw2102.c
index 7552521..f9ad57f 100644
--- a/drivers/media/usb/dvb-usb/dw2102.c
+++ b/drivers/media/usb/dvb-usb/dw2102.c
@@ -117,8 +117,13 @@
 
 struct dw2102_state {
 	u8 initialized;
+	u8 last_lock;
 	struct i2c_client *i2c_client_tuner;
+
+	/* fe hook functions*/
 	int (*old_set_voltage)(struct dvb_frontend *f, fe_sec_voltage_t v);
+	int (*fe_read_status)(struct dvb_frontend *fe,
+		fe_status_t *status);
 };
 
 /* debug */
@@ -1001,6 +1006,23 @@ static void dw210x_led_ctrl(struct dvb_frontend *fe, int offon)
 	i2c_transfer(&udev_adap->dev->i2c_adap, &msg, 1);
 }
 
+static int tt_s2_4600_read_status(struct dvb_frontend *fe, fe_status_t *status)
+{
+	struct dvb_usb_adapter *d =
+		(struct dvb_usb_adapter *)(fe->dvb->priv);
+	struct dw2102_state *st = (struct dw2102_state *)d->dev->priv;
+	int ret;
+
+	ret = st->fe_read_status(fe, status);
+
+	/* resync slave fifo when signal change from unlock to lock */
+	if ((*status & FE_HAS_LOCK) && (!st->last_lock))
+		su3000_streaming_ctrl(d, 1);
+
+	st->last_lock = (*status & FE_HAS_LOCK) ? 1 : 0;
+	return ret;
+}
+
 static struct stv0299_config sharp_z0194a_config = {
 	.demod_address = 0x68,
 	.inittab = sharp_z0194a_inittab,
@@ -1553,6 +1575,12 @@ static int tt_s2_4600_frontend_attach(struct dvb_usb_adapter *adap)
 
 	state->i2c_client_tuner = client;
 
+	/* hook fe: need to resync the slave fifo when signal locks */
+	state->fe_read_status = adap->fe_adap[0].fe->ops.read_status;
+	adap->fe_adap[0].fe->ops.read_status = tt_s2_4600_read_status;
+
+	state->last_lock = 0;
+
 	return 0;
 }
 
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 2/4] dw2102: remove unnecessary newline from log printouts
  2015-05-05 16:33 ` [PATCH 2/4] dw2102: remove unnecessary newline from log printouts Olli Salonen
@ 2015-05-13 20:10   ` Mauro Carvalho Chehab
  0 siblings, 0 replies; 5+ messages in thread
From: Mauro Carvalho Chehab @ 2015-05-13 20:10 UTC (permalink / raw)
  To: Olli Salonen; +Cc: linux-media

Em Tue,  5 May 2015 19:33:53 +0300
Olli Salonen <olli.salonen@iki.fi> escreveu:

> The info and warn functions already add a newline to the end of the
> log printouts, so remove the extra newline from the printouts.

Hi Olli,

The best here would be to convert this driver to use dvb-usb2, and replace
the usage of warn()/info()/dprintk() by the standard driver printk macros:
dev_info()/dev_warn()/...

Regards,
Mauro

> 
> Signed-off-by: Olli Salonen <olli.salonen@iki.fi>
> ---
>  drivers/media/usb/dvb-usb/dw2102.c | 60 +++++++++++++++++++-------------------
>  1 file changed, 30 insertions(+), 30 deletions(-)
> 
> diff --git a/drivers/media/usb/dvb-usb/dw2102.c b/drivers/media/usb/dvb-usb/dw2102.c
> index 4ad6bb2..b1f8a3f 100644
> --- a/drivers/media/usb/dvb-usb/dw2102.c
> +++ b/drivers/media/usb/dvb-usb/dw2102.c
> @@ -307,7 +307,7 @@ static int dw2102_earda_i2c_transfer(struct i2c_adapter *adap, struct i2c_msg ms
>  		u8 ibuf[MAX_XFER_SIZE], obuf[3];
>  
>  		if (2 + msg[1].len > sizeof(ibuf)) {
> -			warn("i2c rd: len=%d is too big!\n",
> +			warn("i2c rd: len=%d is too big!",
>  			     msg[1].len);
>  			ret = -EOPNOTSUPP;
>  			goto unlock;
> @@ -332,7 +332,7 @@ static int dw2102_earda_i2c_transfer(struct i2c_adapter *adap, struct i2c_msg ms
>  			u8 obuf[MAX_XFER_SIZE];
>  
>  			if (2 + msg[0].len > sizeof(obuf)) {
> -				warn("i2c wr: len=%d is too big!\n",
> +				warn("i2c wr: len=%d is too big!",
>  				     msg[1].len);
>  				ret = -EOPNOTSUPP;
>  				goto unlock;
> @@ -350,7 +350,7 @@ static int dw2102_earda_i2c_transfer(struct i2c_adapter *adap, struct i2c_msg ms
>  			u8 obuf[MAX_XFER_SIZE];
>  
>  			if (2 + msg[0].len > sizeof(obuf)) {
> -				warn("i2c wr: len=%d is too big!\n",
> +				warn("i2c wr: len=%d is too big!",
>  				     msg[1].len);
>  				ret = -EOPNOTSUPP;
>  				goto unlock;
> @@ -426,7 +426,7 @@ static int dw2104_i2c_transfer(struct i2c_adapter *adap, struct i2c_msg msg[], i
>  				u8  ibuf[MAX_XFER_SIZE];
>  
>  				if (2 + msg[j].len > sizeof(ibuf)) {
> -					warn("i2c rd: len=%d is too big!\n",
> +					warn("i2c rd: len=%d is too big!",
>  					     msg[j].len);
>  					ret = -EOPNOTSUPP;
>  					goto unlock;
> @@ -463,7 +463,7 @@ static int dw2104_i2c_transfer(struct i2c_adapter *adap, struct i2c_msg msg[], i
>  				u8 obuf[MAX_XFER_SIZE];
>  
>  				if (2 + msg[j].len > sizeof(obuf)) {
> -					warn("i2c wr: len=%d is too big!\n",
> +					warn("i2c wr: len=%d is too big!",
>  					     msg[j].len);
>  					ret = -EOPNOTSUPP;
>  					goto unlock;
> @@ -507,7 +507,7 @@ static int dw3101_i2c_transfer(struct i2c_adapter *adap, struct i2c_msg msg[],
>  		u8 ibuf[MAX_XFER_SIZE], obuf[3];
>  
>  		if (2 + msg[1].len > sizeof(ibuf)) {
> -			warn("i2c rd: len=%d is too big!\n",
> +			warn("i2c rd: len=%d is too big!",
>  			     msg[1].len);
>  			ret = -EOPNOTSUPP;
>  			goto unlock;
> @@ -532,7 +532,7 @@ static int dw3101_i2c_transfer(struct i2c_adapter *adap, struct i2c_msg msg[],
>  			u8 obuf[MAX_XFER_SIZE];
>  
>  			if (2 + msg[0].len > sizeof(obuf)) {
> -				warn("i2c wr: len=%d is too big!\n",
> +				warn("i2c wr: len=%d is too big!",
>  				     msg[0].len);
>  				ret = -EOPNOTSUPP;
>  				goto unlock;
> @@ -623,7 +623,7 @@ static int s6x0_i2c_transfer(struct i2c_adapter *adap, struct i2c_msg msg[],
>  				u8 ibuf[MAX_XFER_SIZE];
>  
>  				if (msg[j].len > sizeof(ibuf)) {
> -					warn("i2c rd: len=%d is too big!\n",
> +					warn("i2c rd: len=%d is too big!",
>  					     msg[j].len);
>  					ret = -EOPNOTSUPP;
>  					goto unlock;
> @@ -658,7 +658,7 @@ static int s6x0_i2c_transfer(struct i2c_adapter *adap, struct i2c_msg msg[],
>  				u8 obuf[MAX_XFER_SIZE];
>  
>  				if (2 + msg[j].len > sizeof(obuf)) {
> -					warn("i2c wr: len=%d is too big!\n",
> +					warn("i2c wr: len=%d is too big!",
>  					     msg[j].len);
>  					ret = -EOPNOTSUPP;
>  					goto unlock;
> @@ -678,7 +678,7 @@ static int s6x0_i2c_transfer(struct i2c_adapter *adap, struct i2c_msg msg[],
>  				u8 obuf[MAX_XFER_SIZE];
>  
>  				if (2 + msg[j].len > sizeof(obuf)) {
> -					warn("i2c wr: len=%d is too big!\n",
> +					warn("i2c wr: len=%d is too big!",
>  					     msg[j].len);
>  					ret = -EOPNOTSUPP;
>  					goto unlock;
> @@ -891,7 +891,7 @@ static int su3000_power_ctrl(struct dvb_usb_device *d, int i)
>  	struct dw2102_state *state = (struct dw2102_state *)d->priv;
>  	u8 obuf[] = {0xde, 0};
>  
> -	info("%s: %d, initialized %d\n", __func__, i, state->initialized);
> +	info("%s: %d, initialized %d", __func__, i, state->initialized);
>  
>  	if (i && !state->initialized) {
>  		state->initialized = 1;
> @@ -938,7 +938,7 @@ static int su3000_identify_state(struct usb_device *udev,
>  				 struct dvb_usb_device_description **desc,
>  				 int *cold)
>  {
> -	info("%s\n", __func__);
> +	info("%s", __func__);
>  
>  	*cold = 0;
>  	return 0;
> @@ -1172,7 +1172,7 @@ static int dw2104_frontend_attach(struct dvb_usb_adapter *d)
>  				tuner_ops->set_bandwidth = stb6100_set_bandw;
>  				tuner_ops->get_bandwidth = stb6100_get_bandw;
>  				d->fe_adap[0].fe->ops.set_voltage = dw210x_set_voltage;
> -				info("Attached STV0900+STB6100!\n");
> +				info("Attached STV0900+STB6100!");
>  				return 0;
>  			}
>  		}
> @@ -1186,7 +1186,7 @@ static int dw2104_frontend_attach(struct dvb_usb_adapter *d)
>  					&dw2104_stv6110_config,
>  					&d->dev->i2c_adap)) {
>  				d->fe_adap[0].fe->ops.set_voltage = dw210x_set_voltage;
> -				info("Attached STV0900+STV6110A!\n");
> +				info("Attached STV0900+STV6110A!");
>  				return 0;
>  			}
>  		}
> @@ -1197,7 +1197,7 @@ static int dw2104_frontend_attach(struct dvb_usb_adapter *d)
>  				&d->dev->i2c_adap);
>  		if (d->fe_adap[0].fe != NULL) {
>  			d->fe_adap[0].fe->ops.set_voltage = dw210x_set_voltage;
> -			info("Attached cx24116!\n");
> +			info("Attached cx24116!");
>  			return 0;
>  		}
>  	}
> @@ -1208,7 +1208,7 @@ static int dw2104_frontend_attach(struct dvb_usb_adapter *d)
>  		dvb_attach(ts2020_attach, d->fe_adap[0].fe,
>  			&dw2104_ts2020_config, &d->dev->i2c_adap);
>  		d->fe_adap[0].fe->ops.set_voltage = dw210x_set_voltage;
> -		info("Attached DS3000!\n");
> +		info("Attached DS3000!");
>  		return 0;
>  	}
>  
> @@ -1227,7 +1227,7 @@ static int dw2102_frontend_attach(struct dvb_usb_adapter *d)
>  					&d->dev->i2c_adap);
>  		if (d->fe_adap[0].fe != NULL) {
>  			d->fe_adap[0].fe->ops.set_voltage = dw210x_set_voltage;
> -			info("Attached si21xx!\n");
> +			info("Attached si21xx!");
>  			return 0;
>  		}
>  	}
> @@ -1239,7 +1239,7 @@ static int dw2102_frontend_attach(struct dvb_usb_adapter *d)
>  			if (dvb_attach(stb6000_attach, d->fe_adap[0].fe, 0x61,
>  					&d->dev->i2c_adap)) {
>  				d->fe_adap[0].fe->ops.set_voltage = dw210x_set_voltage;
> -				info("Attached stv0288!\n");
> +				info("Attached stv0288!");
>  				return 0;
>  			}
>  		}
> @@ -1251,7 +1251,7 @@ static int dw2102_frontend_attach(struct dvb_usb_adapter *d)
>  					&d->dev->i2c_adap);
>  		if (d->fe_adap[0].fe != NULL) {
>  			d->fe_adap[0].fe->ops.set_voltage = dw210x_set_voltage;
> -			info("Attached stv0299!\n");
> +			info("Attached stv0299!");
>  			return 0;
>  		}
>  	}
> @@ -1263,7 +1263,7 @@ static int dw3101_frontend_attach(struct dvb_usb_adapter *d)
>  	d->fe_adap[0].fe = dvb_attach(tda10023_attach, &dw3101_tda10023_config,
>  				&d->dev->i2c_adap, 0x48);
>  	if (d->fe_adap[0].fe != NULL) {
> -		info("Attached tda10023!\n");
> +		info("Attached tda10023!");
>  		return 0;
>  	}
>  	return -EIO;
> @@ -1277,7 +1277,7 @@ static int zl100313_frontend_attach(struct dvb_usb_adapter *d)
>  		if (dvb_attach(zl10039_attach, d->fe_adap[0].fe, 0x60,
>  				&d->dev->i2c_adap)) {
>  			d->fe_adap[0].fe->ops.set_voltage = dw210x_set_voltage;
> -			info("Attached zl100313+zl10039!\n");
> +			info("Attached zl100313+zl10039!");
>  			return 0;
>  		}
>  	}
> @@ -1302,7 +1302,7 @@ static int stv0288_frontend_attach(struct dvb_usb_adapter *d)
>  
>  	dw210x_op_rw(d->dev->udev, 0x8a, 0, 0, obuf, 2, DW210X_WRITE_MSG);
>  
> -	info("Attached stv0288+stb6000!\n");
> +	info("Attached stv0288+stb6000!");
>  
>  	return 0;
>  
> @@ -1327,7 +1327,7 @@ static int ds3000_frontend_attach(struct dvb_usb_adapter *d)
>  
>  	dw210x_op_rw(d->dev->udev, 0x8a, 0, 0, obuf, 2, DW210X_WRITE_MSG);
>  
> -	info("Attached ds3000+ts2020!\n");
> +	info("Attached ds3000+ts2020!");
>  
>  	return 0;
>  }
> @@ -1345,7 +1345,7 @@ static int prof_7500_frontend_attach(struct dvb_usb_adapter *d)
>  
>  	dw210x_op_rw(d->dev->udev, 0x8a, 0, 0, obuf, 2, DW210X_WRITE_MSG);
>  
> -	info("Attached STV0900+STB6100A!\n");
> +	info("Attached STV0900+STB6100A!");
>  
>  	return 0;
>  }
> @@ -1393,11 +1393,11 @@ static int su3000_frontend_attach(struct dvb_usb_adapter *d)
>  	if (dvb_attach(ts2020_attach, d->fe_adap[0].fe,
>  				&dw2104_ts2020_config,
>  				&d->dev->i2c_adap)) {
> -		info("Attached DS3000/TS2020!\n");
> +		info("Attached DS3000/TS2020!");
>  		return 0;
>  	}
>  
> -	info("Failed to attach DS3000/TS2020!\n");
> +	info("Failed to attach DS3000/TS2020!");
>  	return -EIO;
>  }
>  
> @@ -1442,12 +1442,12 @@ static int t220_frontend_attach(struct dvb_usb_adapter *d)
>  	if (d->fe_adap[0].fe != NULL) {
>  		if (dvb_attach(tda18271_attach, d->fe_adap[0].fe, 0x60,
>  					&d->dev->i2c_adap, &tda18271_config)) {
> -			info("Attached TDA18271HD/CXD2820R!\n");
> +			info("Attached TDA18271HD/CXD2820R!");
>  			return 0;
>  		}
>  	}
>  
> -	info("Failed to attach TDA18271HD/CXD2820R!\n");
> +	info("Failed to attach TDA18271HD/CXD2820R!");
>  	return -EIO;
>  }
>  
> @@ -1468,11 +1468,11 @@ static int m88rs2000_frontend_attach(struct dvb_usb_adapter *d)
>  	if (dvb_attach(ts2020_attach, d->fe_adap[0].fe,
>  				&dw2104_ts2020_config,
>  				&d->dev->i2c_adap)) {
> -		info("Attached RS2000/TS2020!\n");
> +		info("Attached RS2000/TS2020!");
>  		return 0;
>  	}
>  
> -	info("Failed to attach RS2000/TS2020!\n");
> +	info("Failed to attach RS2000/TS2020!");
>  	return -EIO;
>  }
>  

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-05-13 20:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-05 16:33 [PATCH 1/4] dw2102: remove unnecessary printing of MAC address Olli Salonen
2015-05-05 16:33 ` [PATCH 2/4] dw2102: remove unnecessary newline from log printouts Olli Salonen
2015-05-13 20:10   ` Mauro Carvalho Chehab
2015-05-05 16:33 ` [PATCH 3/4] dw2102: debugging improvements Olli Salonen
2015-05-05 16:33 ` [PATCH 4/4] dw2102: resync fifo when demod locks Olli Salonen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).