diff options
author | Fabian Frederick <fabf@skynet.be> | 2015-06-10 12:32:44 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-07-17 08:02:48 -0400 |
commit | 41cc14ba11d7d8532ef4f615c39eb6ebdcdeef61 (patch) | |
tree | 63243dd68cffe6ce08dc2f2eb63cd55ae8e4e438 | |
parent | 8783b9c50400c6279d7c3b716637b98e83d3c933 (diff) |
[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>
-rw-r--r-- | drivers/media/usb/ttusb-dec/ttusb_dec.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/media/usb/ttusb-dec/ttusb_dec.c b/drivers/media/usb/ttusb-dec/ttusb_dec.c index 322b53a4f1dd..7c3a7c55d969 100644 --- a/drivers/media/usb/ttusb-dec/ttusb_dec.c +++ b/drivers/media/usb/ttusb-dec/ttusb_dec.c | |||
@@ -593,14 +593,9 @@ static void ttusb_dec_process_packet(struct ttusb_dec *dec) | |||
593 | 593 | ||
594 | static void swap_bytes(u8 *b, int length) | 594 | static void swap_bytes(u8 *b, int length) |
595 | { | 595 | { |
596 | u8 c; | ||
597 | |||
598 | length -= length % 2; | 596 | length -= length % 2; |
599 | for (; length; b += 2, length -= 2) { | 597 | for (; length; b += 2, length -= 2) |
600 | c = *b; | 598 | swap(*b, *(b + 1)); |
601 | *b = *(b + 1); | ||
602 | *(b + 1) = c; | ||
603 | } | ||
604 | } | 599 | } |
605 | 600 | ||
606 | static void ttusb_dec_process_urb_frame(struct ttusb_dec *dec, u8 *b, | 601 | static void ttusb_dec_process_urb_frame(struct ttusb_dec *dec, u8 *b, |