diff options
author | Fabian Frederick <fabf@skynet.be> | 2015-06-10 19:32:39 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-07-06 14:25:48 +0300 |
commit | 453f847ef2e445a7b1fe6cbe35d36a06c60f58a5 (patch) | |
tree | 25dbd56ffcb65dfc979e6f2505f6bd146a9e0df1 /drivers/media/radio | |
parent | fd7524294ccaa6168593042121e3bbd26a529fd5 (diff) | |
download | linux-453f847ef2e445a7b1fe6cbe35d36a06c60f58a5.tar.xz |
[media] wl128x: use swap() in fm_rdsparse_swapbytes()
Use kernel.h macro definition.
Thanks to Julia Lawall for Coccinelle scripting support.
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/radio')
-rw-r--r-- | drivers/media/radio/wl128x/fmdrv_common.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/media/radio/wl128x/fmdrv_common.c b/drivers/media/radio/wl128x/fmdrv_common.c index 704397f3c106..ebc73b034249 100644 --- a/drivers/media/radio/wl128x/fmdrv_common.c +++ b/drivers/media/radio/wl128x/fmdrv_common.c @@ -689,7 +689,6 @@ static void fm_rx_update_af_cache(struct fmdev *fmdev, u8 af) static void fm_rdsparse_swapbytes(struct fmdev *fmdev, struct fm_rdsdata_format *rds_format) { - u8 byte1; u8 index = 0; u8 *rds_buff; @@ -701,9 +700,7 @@ static void fm_rdsparse_swapbytes(struct fmdev *fmdev, if (fmdev->asci_id != 0x6350) { rds_buff = &rds_format->data.groupdatabuff.buff[0]; while (index + 1 < FM_RX_RDS_INFO_FIELD_MAX) { - byte1 = rds_buff[index]; - rds_buff[index] = rds_buff[index + 1]; - rds_buff[index + 1] = byte1; + swap(rds_buff[index], rds_buff[index + 1]); index += 2; } } |