diff options
author | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2016-10-12 13:19:27 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2016-10-21 12:40:35 +0200 |
commit | e428744a9fa18a3e114fcd420d8263f8a3e274b3 (patch) | |
tree | 8559f8c140e2ac052bc0254d506d18151e18506b /drivers/media/v4l2-core | |
parent | [media] tuner-core: don't break long lines (diff) | |
download | linux-e428744a9fa18a3e114fcd420d8263f8a3e274b3.tar.xz linux-e428744a9fa18a3e114fcd420d8263f8a3e274b3.zip |
[media] tuner-core: use %&ph for small buffer dumps
This driver has a printk with a continuation lines for debugging purposes.
Since commit 563873318d32 ("Merge branch 'printk-cleanups'"), this
won't work anymore. We might be using KERNEL_CONT, but it is better
to just use a single printk line using %*ph for buffer dump.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/v4l2-core')
-rw-r--r-- | drivers/media/v4l2-core/tuner-core.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/media/v4l2-core/tuner-core.c b/drivers/media/v4l2-core/tuner-core.c index e2613ecb7605..d3a6236b6b02 100644 --- a/drivers/media/v4l2-core/tuner-core.c +++ b/drivers/media/v4l2-core/tuner-core.c @@ -617,14 +617,12 @@ static int tuner_probe(struct i2c_client *client, if (show_i2c) { unsigned char buffer[16]; - int i, rc; + int rc; memset(buffer, 0, sizeof(buffer)); rc = i2c_master_recv(client, buffer, sizeof(buffer)); - tuner_info("I2C RECV = "); - for (i = 0; i < rc; i++) - printk(KERN_CONT "%02x ", buffer[i]); - printk("\n"); + if (rc >= 0) + tuner_info("I2C RECV = %*ph\n", rc, buffer); } /* autodetection code based on the i2c addr */ |