mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-13 22:25:03 +00:00
[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>
This commit is contained in:
parent
8783b9c504
commit
41cc14ba11
1 changed files with 2 additions and 7 deletions
|
@ -593,14 +593,9 @@ static void ttusb_dec_process_packet(struct ttusb_dec *dec)
|
||||||
|
|
||||||
static void swap_bytes(u8 *b, int length)
|
static void swap_bytes(u8 *b, int length)
|
||||||
{
|
{
|
||||||
u8 c;
|
|
||||||
|
|
||||||
length -= length % 2;
|
length -= length % 2;
|
||||||
for (; length; b += 2, length -= 2) {
|
for (; length; b += 2, length -= 2)
|
||||||
c = *b;
|
swap(*b, *(b + 1));
|
||||||
*b = *(b + 1);
|
|
||||||
*(b + 1) = c;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ttusb_dec_process_urb_frame(struct ttusb_dec *dec, u8 *b,
|
static void ttusb_dec_process_urb_frame(struct ttusb_dec *dec, u8 *b,
|
||||||
|
|
Loading…
Reference in a new issue