Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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>

authored by

Fabian Frederick and committed by
Mauro Carvalho Chehab
453f847e fd752429

+1 -4
+1 -4
drivers/media/radio/wl128x/fmdrv_common.c
··· 689 689 static void fm_rdsparse_swapbytes(struct fmdev *fmdev, 690 690 struct fm_rdsdata_format *rds_format) 691 691 { 692 - u8 byte1; 693 692 u8 index = 0; 694 693 u8 *rds_buff; 695 694 ··· 700 701 if (fmdev->asci_id != 0x6350) { 701 702 rds_buff = &rds_format->data.groupdatabuff.buff[0]; 702 703 while (index + 1 < FM_RX_RDS_INFO_FIELD_MAX) { 703 - byte1 = rds_buff[index]; 704 - rds_buff[index] = rds_buff[index + 1]; 705 - rds_buff[index + 1] = byte1; 704 + swap(rds_buff[index], rds_buff[index + 1]); 706 705 index += 2; 707 706 } 708 707 }