summaryrefslogtreecommitdiff
path: root/drivers/media/tuners
diff options
context:
space:
mode:
authorAntti Palosaari <crope@iki.fi>2013-07-24 18:33:51 -0300
committerChanho Park <chanho61.park@samsung.com>2014-11-18 11:51:35 +0900
commitc135c9b7b1e9fc5dee5b04480de10842b04ae6f2 (patch)
tree0c19488ecc02d22918ba9a9a56ef185580ce3c83 /drivers/media/tuners
parent66ab24b5907c9455125165135b6c186d152a101a (diff)
downloadlinux-3.10-c135c9b7b1e9fc5dee5b04480de10842b04ae6f2.tar.gz
linux-3.10-c135c9b7b1e9fc5dee5b04480de10842b04ae6f2.tar.bz2
linux-3.10-c135c9b7b1e9fc5dee5b04480de10842b04ae6f2.zip
upstream: [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/media/tuners')
-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 afe95ed2ec5..2828484518c 100644
--- a/drivers/media/tuners/e4000.c
+++ b/drivers/media/tuners/e4000.c
@@ -333,19 +333,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;