summaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/function/f_uac2.c
diff options
context:
space:
mode:
authorFelipe Balbi <balbi@ti.com>2015-08-04 11:02:45 -0500
committerFelipe Balbi <balbi@ti.com>2015-08-04 11:02:45 -0500
commit0f4315a8f1a73f130bbc5dde134b704ea6dda56c (patch)
tree803b690e7e605203fcae5cbf3c4fae9e5e68c17f /drivers/usb/gadget/function/f_uac2.c
parent7f352964852ede9e95d18fd3825c5200fb48b3a5 (diff)
downloadop-kernel-dev-0f4315a8f1a73f130bbc5dde134b704ea6dda56c.zip
op-kernel-dev-0f4315a8f1a73f130bbc5dde134b704ea6dda56c.tar.gz
usb: gadget: f_uac2: fix build warning
commit 913e4a90b6f9 ("usb: gadget: f_uac2: finalize wMaxPacketSize according to bandwidth") added a possible build warning when calling min(). In order to fix the warning, we just make sure to call min_t() and tell that its arguments should be u16. Cc: Peter Chen <peter.chen@freescale.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/gadget/function/f_uac2.c')
-rw-r--r--drivers/usb/gadget/function/f_uac2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/gadget/function/f_uac2.c b/drivers/usb/gadget/function/f_uac2.c
index b568024..c35a2a1 100644
--- a/drivers/usb/gadget/function/f_uac2.c
+++ b/drivers/usb/gadget/function/f_uac2.c
@@ -994,7 +994,7 @@ static void set_ep_max_packet_size(const struct f_uac2_opts *uac2_opts,
max_packet_size = num_channels(chmask) * ssize *
DIV_ROUND_UP(srate, factor / (1 << (ep_desc->bInterval - 1)));
- ep_desc->wMaxPacketSize = cpu_to_le16(min(max_packet_size,
+ ep_desc->wMaxPacketSize = cpu_to_le16(min_t(u16, max_packet_size,
le16_to_cpu(ep_desc->wMaxPacketSize)));
}
OpenPOWER on IntegriCloud