[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 17/17] usb: move usb_{hi, lo} helpers to header file
From: |
Gerd Hoffmann |
Subject: |
[Qemu-devel] [PATCH 17/17] usb: move usb_{hi, lo} helpers to header file. |
Date: |
Fri, 29 Nov 2013 09:06:21 +0100 |
Signed-off-by: Gerd Hoffmann <address@hidden>
---
hw/usb/desc.c | 10 ----------
hw/usb/desc.h | 11 +++++++++++
2 files changed, 11 insertions(+), 10 deletions(-)
diff --git a/hw/usb/desc.c b/hw/usb/desc.c
index 5dbe754..f18a043 100644
--- a/hw/usb/desc.c
+++ b/hw/usb/desc.c
@@ -6,16 +6,6 @@
/* ------------------------------------------------------------------ */
-static uint8_t usb_lo(uint16_t val)
-{
- return val & 0xff;
-}
-
-static uint8_t usb_hi(uint16_t val)
-{
- return (val >> 8) & 0xff;
-}
-
int usb_desc_device(const USBDescID *id, const USBDescDevice *dev,
uint8_t *dest, size_t len)
{
diff --git a/hw/usb/desc.h b/hw/usb/desc.h
index ddd3e74..81327b0 100644
--- a/hw/usb/desc.h
+++ b/hw/usb/desc.h
@@ -194,6 +194,17 @@ struct USBDesc {
#define USB_DESC_FLAG_SUPER (1 << 1)
+/* little helpers */
+static inline uint8_t usb_lo(uint16_t val)
+{
+ return val & 0xff;
+}
+
+static inline uint8_t usb_hi(uint16_t val)
+{
+ return (val >> 8) & 0xff;
+}
+
/* generate usb packages from structs */
int usb_desc_device(const USBDescID *id, const USBDescDevice *dev,
uint8_t *dest, size_t len);
--
1.8.3.1
- [Qemu-devel] [PULL 00/17] usb patch queue, Gerd Hoffmann, 2013/11/29
- [Qemu-devel] [PATCH 02/17] xhci: add support for suspend/resume, Gerd Hoffmann, 2013/11/29
- [Qemu-devel] [PATCH 01/17] xhci: Add a few missing checks for disconnected devices, Gerd Hoffmann, 2013/11/29
- [Qemu-devel] [PATCH 13/17] ehci: implement port wakeup, Gerd Hoffmann, 2013/11/29
- [Qemu-devel] [PATCH 11/17] usb: Add usb_device_alloc/free_streams, Gerd Hoffmann, 2013/11/29
- [Qemu-devel] [PATCH 12/17] xhci: Call usb_device_alloc/free_streams, Gerd Hoffmann, 2013/11/29
- [Qemu-devel] [PATCH 17/17] usb: move usb_{hi, lo} helpers to header file.,
Gerd Hoffmann <=
- [Qemu-devel] [PATCH 07/17] uas: Bounds check tags when using streams, Gerd Hoffmann, 2013/11/29
- [Qemu-devel] [PATCH 14/17] Revert "usb-tablet: Don't claim wakeup capability for USB-2 version", Gerd Hoffmann, 2013/11/29
- [Qemu-devel] [PATCH 06/17] uas: Streams are numbered 1-y, rather then 0-x, Gerd Hoffmann, 2013/11/29
- [Qemu-devel] [PATCH 15/17] trace-events: Clean up after removal of old usb-host code, Gerd Hoffmann, 2013/11/29
- [Qemu-devel] [PATCH 08/17] uas: Fix response iu struct definition, Gerd Hoffmann, 2013/11/29
- [Qemu-devel] [PATCH 09/17] uas: s/ui/iu/, Gerd Hoffmann, 2013/11/29
- [Qemu-devel] [PATCH 16/17] usb: add vendor request defines, Gerd Hoffmann, 2013/11/29
- [Qemu-devel] [PATCH 04/17] uas: Only use report iu-s for task_mgmt status reporting, Gerd Hoffmann, 2013/11/29
- [Qemu-devel] [PATCH 10/17] usb: Add max_streams attribute to endpoint info, Gerd Hoffmann, 2013/11/29
- [Qemu-devel] [PATCH 05/17] uas: Fix / cleanup usb_uas_task error handling, Gerd Hoffmann, 2013/11/29