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

[media] ttusb-dec: use swap() in swap_bytes()

Use kernel.h macro definition.

Thanks to Julia Lawall for Coccinelle scripting support.

Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>

authored by

Fabian Frederick and committed by
Mauro Carvalho Chehab
41cc14ba 8783b9c5

+2 -7
+2 -7
drivers/media/usb/ttusb-dec/ttusb_dec.c
··· 593 593 594 594 static void swap_bytes(u8 *b, int length) 595 595 { 596 - u8 c; 597 - 598 596 length -= length % 2; 599 - for (; length; b += 2, length -= 2) { 600 - c = *b; 601 - *b = *(b + 1); 602 - *(b + 1) = c; 603 - } 597 + for (; length; b += 2, length -= 2) 598 + swap(*b, *(b + 1)); 604 599 } 605 600 606 601 static void ttusb_dec_process_urb_frame(struct ttusb_dec *dec, u8 *b,