[PATCH 33/75] headers: backport usb_maxpacket api change

Hauke Mehrtens <[email protected]> Fri, 28 Jun 2024 01:47:19 +0200
Newsgroups org.kernel.vger.backports
Message-ID <[email protected]>
From: Felix Fietkau <[email protected]>

The third argument was removed

Signed-off-by: Felix Fietkau <[email protected]>
---
 backport/backport-include/linux/usb.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/backport/backport-include/linux/usb.h b/backport/backport-include/linux/usb.h
index bedc405b..ba39657b 100644
--- a/backport/backport-include/linux/usb.h
+++ b/backport/backport-include/linux/usb.h
@@ -9,4 +9,12 @@ bool usb_check_bulk_endpoints(
 		const struct usb_interface *intf, const u8 *ep_addrs);
 #endif /* < 5.15 */
 
+#if LINUX_VERSION_IS_LESS(5,19,0)
+static inline u16 backport_usb_maxpacket(struct usb_device *udev, int pipe)
+{
+	return usb_maxpacket(udev, pipe, usb_pipeout(pipe));
+}
+#define usb_maxpacket LINUX_BACKPORT(usb_maxpacket)
+#endif /* <5.19 */
+
 #endif /* __BACKPORT_LINUX_USB_H */
-- 
2.45.2