Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 41cc14ba authored by Fabian Frederick's avatar Fabian Frederick Committed by Mauro Carvalho Chehab
Browse files

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



Use kernel.h macro definition.

Thanks to Julia Lawall for Coccinelle scripting support.

Signed-off-by: default avatarFabian Frederick <fabf@skynet.be>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent 8783b9c5
Loading
Loading
Loading
Loading
+2 −7
Original line number Original line Diff line number Diff line
@@ -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,