]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
[media] wl128x: use swap() in fm_rdsparse_swapbytes()
authorFabian Frederick <fabf@skynet.be>
Wed, 10 Jun 2015 16:32:39 +0000 (13:32 -0300)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Mon, 6 Jul 2015 11:25:48 +0000 (08:25 -0300)
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>
drivers/media/radio/wl128x/fmdrv_common.c

index 704397f3c106b6419ed7a3c88b8dcb2f7ae3a902..ebc73b03424960fe65f3db7721ffedb79a0e1d41 100644 (file)
@@ -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;
                }
        }