提交 1ca6ae8d 编写于 作者: J John Törnblom 提交者: Mauro Carvalho Chehab

[media] bttv: avoid flooding the kernel log when i2c debugging is disabled

When the bttv driver is running without i2c_debug being set, the kernel
log is being flooded with the string ">". This string is really a part of
a debug message that is logged using several substrings protected by a
conditional check.
This patch adds the same conditional check to the leaked substring.
Signed-off-by: NJohn Törnblom <john.tornblom@gmail.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
上级 e19bc863
...@@ -173,7 +173,7 @@ bttv_i2c_sendbytes(struct bttv *btv, const struct i2c_msg *msg, int last) ...@@ -173,7 +173,7 @@ bttv_i2c_sendbytes(struct bttv *btv, const struct i2c_msg *msg, int last)
if (i2c_debug) if (i2c_debug)
pr_cont(" %02x", msg->buf[cnt]); pr_cont(" %02x", msg->buf[cnt]);
} }
if (!(xmit & BT878_I2C_NOSTOP)) if (i2c_debug && !(xmit & BT878_I2C_NOSTOP))
pr_cont(">\n"); pr_cont(">\n");
return msg->len; return msg->len;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册