[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>
这个提交包含在:

提交者
Mauro Carvalho Chehab

父节点
8783b9c504
当前提交
41cc14ba11
@@ -593,14 +593,9 @@ static void ttusb_dec_process_packet(struct ttusb_dec *dec)
|
||||
|
||||
static void swap_bytes(u8 *b, int length)
|
||||
{
|
||||
u8 c;
|
||||
|
||||
length -= length % 2;
|
||||
for (; length; b += 2, length -= 2) {
|
||||
c = *b;
|
||||
*b = *(b + 1);
|
||||
*(b + 1) = c;
|
||||
}
|
||||
for (; length; b += 2, length -= 2)
|
||||
swap(*b, *(b + 1));
|
||||
}
|
||||
|
||||
static void ttusb_dec_process_urb_frame(struct ttusb_dec *dec, u8 *b,
|
||||
|
在新工单中引用
屏蔽一个用户