]> git.karo-electronics.de Git - linux-beck.git/commitdiff
[media] e4000: use swap() macro
authorAntti Palosaari <crope@iki.fi>
Wed, 24 Jul 2013 21:33:51 +0000 (18:33 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Sun, 18 Aug 2013 10:52:51 +0000 (07:52 -0300)
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
drivers/media/tuners/e4000.c

index a3a9c87a472b0ba8e76b30943e12c88c766a33c3..f3b872a6b38118396bab034a3b553fdc42b6fc28 100644 (file)
@@ -316,19 +316,14 @@ static int e4000_set_params(struct dvb_frontend *fe)
                q_data[i] = (((buf[2] >> 4) & 0x3) << 6) | (buf[1] & 0x3f);
        }
 
-       buf[0] = q_data[0];
-       buf[1] = q_data[1];
-       buf[2] = q_data[3];
-       buf[3] = q_data[2];
-       ret = e4000_wr_regs(priv, 0x50, buf, 4);
+       swap(q_data[2], q_data[3]);
+       swap(i_data[2], i_data[3]);
+
+       ret = e4000_wr_regs(priv, 0x50, q_data, 4);
        if (ret < 0)
                goto err;
 
-       buf[0] = i_data[0];
-       buf[1] = i_data[1];
-       buf[2] = i_data[3];
-       buf[3] = i_data[2];
-       ret = e4000_wr_regs(priv, 0x60, buf, 4);
+       ret = e4000_wr_regs(priv, 0x60, i_data, 4);
        if (ret < 0)
                goto err;