Skip to content

Commit

Permalink
[media] bttv: avoid flooding the kernel log when i2c debugging is dis…
Browse files Browse the repository at this point in the history
…abled

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: John Törnblom <john.tornblom@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
John Törnblom authored and Mauro Carvalho Chehab committed Dec 27, 2012
1 parent e19bc86 commit 1ca6ae8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/media/pci/bt8xx/bttv-i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ bttv_i2c_sendbytes(struct bttv *btv, const struct i2c_msg *msg, int last)
if (i2c_debug)
pr_cont(" %02x", msg->buf[cnt]);
}
if (!(xmit & BT878_I2C_NOSTOP))
if (i2c_debug && !(xmit & BT878_I2C_NOSTOP))
pr_cont(">\n");
return msg->len;

Expand Down

0 comments on commit 1ca6ae8

Please sign in to comment.