diff mbox series

[U-Boot,v3,4/5] usb: kbd: move USB_KBD_BOOT_REPORT_SIZE to usb.h

Message ID 20191010213659.13522-5-xypron.glpk@gmx.de
State Superseded
Delegated to: Marek Vasut
Headers show
Series usb: kbd: implement special keys | expand

Commit Message

Heinrich Schuchardt Oct. 10, 2019, 9:36 p.m. UTC
Move constant USB_KBD_BOOT_REPORT_SIZE. This allows us to reuse it.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
---
v3:
	no change
v2:
	new patch
---
 common/usb_kbd.c | 6 ------
 include/usb.h    | 6 ++++++
 2 files changed, 6 insertions(+), 6 deletions(-)

--
2.23.0
diff mbox series

Patch

diff --git a/common/usb_kbd.c b/common/usb_kbd.c
index 3f84c28201..d4e7ef6210 100644
--- a/common/usb_kbd.c
+++ b/common/usb_kbd.c
@@ -87,12 +87,6 @@  static const unsigned char usb_kbd_num_keypad[] = {
 #define USB_KBD_LEDMASK		\
 	(USB_KBD_NUMLOCK | USB_KBD_CAPSLOCK | USB_KBD_SCROLLLOCK)

-/*
- * USB Keyboard reports are 8 bytes in boot protocol.
- * Appendix B of HID Device Class Definition 1.11
- */
-#define USB_KBD_BOOT_REPORT_SIZE 8
-
 struct usb_kbd_pdata {
 	unsigned long	intpipe;
 	int		intpktsize;
diff --git a/include/usb.h b/include/usb.h
index bcad552f85..efb67ea33f 100644
--- a/include/usb.h
+++ b/include/usb.h
@@ -242,6 +242,12 @@  int usb_host_eth_scan(int mode);

 #ifdef CONFIG_USB_KEYBOARD

+/*
+ * USB Keyboard reports are 8 bytes in boot protocol.
+ * Appendix B of HID Device Class Definition 1.11
+ */
+#define USB_KBD_BOOT_REPORT_SIZE 8
+
 int drv_usb_kbd_init(void);
 int usb_kbd_deregister(int force);