diff mbox series

[2/8] headers: backport usb_maxpacket api change

Message ID 20221013085351.14516-2-nbd@nbd.name (mailing list archive)
State New, archived
Headers show
Series [1/8] headers: backport napi add functions | expand

Commit Message

Felix Fietkau Oct. 13, 2022, 8:53 a.m. UTC
The third argument was removed

Signed-off-by: Felix Fietkau <nbd@nbd.name>
---
 backport/backport-include/linux/usb.h | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
 create mode 100644 backport/backport-include/linux/usb.h
diff mbox series

Patch

diff --git a/backport/backport-include/linux/usb.h b/backport/backport-include/linux/usb.h
new file mode 100644
index 000000000000..844cdcc7d55e
--- /dev/null
+++ b/backport/backport-include/linux/usb.h
@@ -0,0 +1,14 @@ 
+#ifndef __BACKPORT_LINUX_USB_H
+#define __BACKPORT_LINUX_USB_H
+#include_next <linux/usb.h>
+#include <linux/version.h>
+
+#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