summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAntti Palosaari <crope@iki.fi>2013-07-24 18:33:51 -0300
committerMauro Carvalho Chehab <m.chehab@samsung.com>2013-08-18 07:52:51 -0300
commitd4992da3872d1826f6dfe7f7c8add32fda99a5d1 (patch)
treee4b0f9e9a848c60a23515188498eb19e66578790 /drivers
parent8514611438e9e324a9faeac69393c62ef76a5832 (diff)
[media] e4000: use swap() macro
Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/tuners/e4000.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/drivers/media/tuners/e4000.c b/drivers/media/tuners/e4000.c
index a3a9c87a472..f3b872a6b38 100644
--- a/drivers/media/tuners/e4000.c
+++ b/drivers/media/tuners/e4000.c
@@ -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;