diff options
Diffstat (limited to 'drivers/staging/media/lirc/lirc_sasem.c')
-rw-r--r-- | drivers/staging/media/lirc/lirc_sasem.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/drivers/staging/media/lirc/lirc_sasem.c b/drivers/staging/media/lirc/lirc_sasem.c index c20ef56202bf..4a268200cbf5 100644 --- a/drivers/staging/media/lirc/lirc_sasem.c +++ b/drivers/staging/media/lirc/lirc_sasem.c @@ -488,7 +488,7 @@ static int ir_open(void *data) /* prevent races with disconnect */ mutex_lock(&disconnect_lock); - context = (struct sasem_context *) data; + context = data; mutex_lock(&context->ctx_lock); @@ -530,7 +530,7 @@ static void ir_close(void *data) { struct sasem_context *context; - context = (struct sasem_context *)data; + context = data; if (!context) { pr_err("%s: no context for device\n", __func__); return; @@ -573,7 +573,6 @@ static void incoming_packet(struct sasem_context *context, unsigned char *buf = urb->transfer_buffer; long ms; struct timeval tv; - int i; if (len != 8) { dev_warn(&context->dev->dev, @@ -582,13 +581,8 @@ static void incoming_packet(struct sasem_context *context, return; } - if (debug) { - printk(KERN_INFO "Incoming data: "); - for (i = 0; i < 8; ++i) - printk(KERN_CONT "%02x ", buf[i]); - printk(KERN_CONT "\n"); - } - + if (debug) + dev_info(&context->dev->dev, "Incoming data: %*ph\n", len, buf); /* * Lirc could deal with the repeat code, but we really need to block it * if it arrives too late. Otherwise we could repeat the wrong code. |