Commit 453f847e authored by Fabian Frederick's avatar Fabian Frederick Committed by Mauro Carvalho Chehab

[media] wl128x: use swap() in fm_rdsparse_swapbytes()

Use kernel.h macro definition.

Thanks to Julia Lawall for Coccinelle scripting support.
Signed-off-by: default avatarFabian Frederick <fabf@skynet.be>
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent fd752429
...@@ -689,7 +689,6 @@ static void fm_rx_update_af_cache(struct fmdev *fmdev, u8 af) ...@@ -689,7 +689,6 @@ static void fm_rx_update_af_cache(struct fmdev *fmdev, u8 af)
static void fm_rdsparse_swapbytes(struct fmdev *fmdev, static void fm_rdsparse_swapbytes(struct fmdev *fmdev,
struct fm_rdsdata_format *rds_format) struct fm_rdsdata_format *rds_format)
{ {
u8 byte1;
u8 index = 0; u8 index = 0;
u8 *rds_buff; u8 *rds_buff;
...@@ -701,9 +700,7 @@ static void fm_rdsparse_swapbytes(struct fmdev *fmdev, ...@@ -701,9 +700,7 @@ static void fm_rdsparse_swapbytes(struct fmdev *fmdev,
if (fmdev->asci_id != 0x6350) { if (fmdev->asci_id != 0x6350) {
rds_buff = &rds_format->data.groupdatabuff.buff[0]; rds_buff = &rds_format->data.groupdatabuff.buff[0];
while (index + 1 < FM_RX_RDS_INFO_FIELD_MAX) { while (index + 1 < FM_RX_RDS_INFO_FIELD_MAX) {
byte1 = rds_buff[index]; swap(rds_buff[index], rds_buff[index + 1]);
rds_buff[index] = rds_buff[index + 1];
rds_buff[index + 1] = byte1;
index += 2; index += 2;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment