Commit 727b81da authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Mauro Carvalho Chehab

[media] staging: lirc: use %*ph to print small buffers

Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: linux-media@vger.kernel.org
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 28e9cc80
...@@ -325,8 +325,8 @@ static int igorplugusb_remote_poll(void *data, struct lirc_buffer *buf) ...@@ -325,8 +325,8 @@ static int igorplugusb_remote_poll(void *data, struct lirc_buffer *buf)
if (ret < DEVICE_HEADERLEN) if (ret < DEVICE_HEADERLEN)
return -ENODATA; return -ENODATA;
dprintk(DRIVER_NAME ": Got %d bytes. Header: %02x %02x %02x\n", dprintk(DRIVER_NAME ": Got %d bytes. Header: %*ph\n",
ret, ir->buf_in[0], ir->buf_in[1], ir->buf_in[2]); ret, 3, ir->buf_in);
do_gettimeofday(&now); do_gettimeofday(&now);
timediff = now.tv_sec - ir->last_time.tv_sec; timediff = now.tv_sec - ir->last_time.tv_sec;
......
...@@ -658,8 +658,7 @@ static int send_data_block(struct IR_tx *tx, unsigned char *data_block) ...@@ -658,8 +658,7 @@ static int send_data_block(struct IR_tx *tx, unsigned char *data_block)
buf[0] = (unsigned char)(i + 1); buf[0] = (unsigned char)(i + 1);
for (j = 0; j < tosend; ++j) for (j = 0; j < tosend; ++j)
buf[1 + j] = data_block[i + j]; buf[1 + j] = data_block[i + j];
dprintk("%02x %02x %02x %02x %02x", dprintk("%*ph", 5, buf);
buf[0], buf[1], buf[2], buf[3], buf[4]);
ret = i2c_master_send(tx->c, buf, tosend + 1); ret = i2c_master_send(tx->c, buf, tosend + 1);
if (ret != tosend + 1) { if (ret != tosend + 1) {
zilog_error("i2c_master_send failed with %d\n", ret); zilog_error("i2c_master_send failed with %d\n", ret);
......
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