]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
[media] mt20xx: use %*ph to do small hexa dumps
authorMauro Carvalho Chehab <mchehab@s-opensource.com>
Fri, 14 Oct 2016 13:37:48 +0000 (10:37 -0300)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Fri, 21 Oct 2016 10:51:28 +0000 (08:51 -0200)
Since commit 563873318d32 ("Merge branch 'printk-cleanups"),
continuation lines require KERN_CONT. Instead, let's just
use %*ph to print the buffer.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/tuners/mt20xx.c

index 52da4671b0e07da1eb3fbdd5ed52224de3d3e51c..29dadd171b318e1d615210f0147a03cadb459a3c 100644 (file)
@@ -487,13 +487,8 @@ static void mt2050_set_if_freq(struct dvb_frontend *fe,unsigned int freq, unsign
        buf[5]=div2a;
        if(num2!=0) buf[5]=buf[5]|0x40;
 
-       if (debug > 1) {
-               int i;
-               tuner_dbg("bufs is: ");
-               for(i=0;i<6;i++)
-                       printk("%x ",buf[i]);
-               printk("\n");
-       }
+       if (debug > 1)
+               tuner_dbg("bufs is: %*ph\n", 6, buf);
 
        ret=tuner_i2c_xfer_send(&priv->i2c_props,buf,6);
        if (ret!=6)
@@ -619,15 +614,9 @@ struct dvb_frontend *microtune_attach(struct dvb_frontend *fe,
 
        tuner_i2c_xfer_send(&priv->i2c_props,buf,1);
        tuner_i2c_xfer_recv(&priv->i2c_props,buf,21);
-       if (debug) {
-               int i;
-               tuner_dbg("MT20xx hexdump:");
-               for(i=0;i<21;i++) {
-                       printk(" %02x",buf[i]);
-                       if(((i+1)%8)==0) printk(" ");
-               }
-               printk("\n");
-       }
+       if (debug)
+               tuner_dbg("MT20xx hexdump: %*ph\n", 21, buf);
+
        company_code = buf[0x11] << 8 | buf[0x12];
        tuner_info("microtune: companycode=%04x part=%02x rev=%02x\n",
                   company_code,buf[0x13],buf[0x14]);