[media] Staging: media: lirc: cleaned up packet dump in 2 files
authorAmber Thrall <amber.rose.thrall@gmail.com>
Fri, 3 Oct 2014 02:33:30 +0000 (23:33 -0300)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Mon, 3 Nov 2014 10:38:17 +0000 (08:38 -0200)
lirc_imon.c and lirc_sasem.c contain an incoming_packet method that
is using deprecated printk's.  Removed blocks replacing with single
dev_info with a %*ph format instead.

Signed-off-by: Amber Thrall <amber.rose.thrall@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/staging/media/lirc/lirc_imon.c
drivers/staging/media/lirc/lirc_sasem.c

index 7aca44f28c5ad54087b9a6fdd2dbe0fc6ff1bb20..232edd5b1742cd38e3263ee9151627aeafd97d0e 100644 (file)
@@ -606,7 +606,6 @@ static void imon_incoming_packet(struct imon_context *context,
        struct device *dev = context->driver->dev;
        int octet, bit;
        unsigned char mask;
-       int i;
 
        /*
         * just bail out if no listening IR client
@@ -620,13 +619,8 @@ static void imon_incoming_packet(struct imon_context *context,
                return;
        }
 
-       if (debug) {
-               dev_info(dev, "raw packet: ");
-               for (i = 0; i < len; ++i)
-                       printk("%02x ", buf[i]);
-               printk("\n");
-       }
-
+       if (debug)
+               dev_info(dev, "raw packet: %*ph\n", len, buf);
        /*
         * Translate received data to pulse and space lengths.
         * Received data is active low, i.e. pulses are 0 and
index c20ef56202bf05ab9c8c72860c01f08ef813beeb..2f0463eb98877cacb2803f39284446837d590c62 100644 (file)
@@ -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.