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

Commit 64dce914 authored by Sebastian Andrzej Siewior's avatar Sebastian Andrzej Siewior Committed by Felipe Balbi
Browse files

usb: gadget storage: use a computation macro for INT endpoint interval



The 9 for HS means 32ms. Use the macro to make it easier to read.

Signed-off-by: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent bcb2f99c
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -441,7 +441,7 @@ fsg_hs_intr_in_desc = {
	/* bEndpointAddress copied from fs_intr_in_desc during fsg_bind() */
	/* bEndpointAddress copied from fs_intr_in_desc during fsg_bind() */
	.bmAttributes =		USB_ENDPOINT_XFER_INT,
	.bmAttributes =		USB_ENDPOINT_XFER_INT,
	.wMaxPacketSize =	cpu_to_le16(2),
	.wMaxPacketSize =	cpu_to_le16(2),
	.bInterval =		9,	/* 2**(9-1) = 256 uframes -> 32 ms */
	.bInterval =		USB_MS_TO_HS_INTERVAL(32),	/* 32 ms */
};
};


#ifndef FSG_NO_OTG
#ifndef FSG_NO_OTG
@@ -509,7 +509,7 @@ fsg_ss_intr_in_desc = {
	/* bEndpointAddress copied from fs_intr_in_desc during fsg_bind() */
	/* bEndpointAddress copied from fs_intr_in_desc during fsg_bind() */
	.bmAttributes =		USB_ENDPOINT_XFER_INT,
	.bmAttributes =		USB_ENDPOINT_XFER_INT,
	.wMaxPacketSize =	cpu_to_le16(2),
	.wMaxPacketSize =	cpu_to_le16(2),
	.bInterval =		9,	/* 2**(9-1) = 256 uframes -> 32 ms */
	.bInterval =		USB_MS_TO_HS_INTERVAL(32),	/* 32 ms */
};
};


static struct usb_ss_ep_comp_descriptor fsg_ss_intr_in_comp_desc = {
static struct usb_ss_ep_comp_descriptor fsg_ss_intr_in_comp_desc = {