From 2d1fb7e480bd46cc270d3fa269e704a6850b741f Mon Sep 17 00:00:00 2001 From: "Wu, Xiaoguang" Date: Thu, 19 Apr 2018 21:45:36 +0800 Subject: [PATCH] DM USB: move the UREQ macro into common header move the UREQ macro from usb_mouse.c to usb.h Change-Id: I977cf73291610b0448eb031a500788a397b55f88 Signed-off-by: Wu, Xiaoguang Reviewed-by: Shuo Liu Reviewed-by: Yu Wang Reviewed-by: Zhao Yakui Acked-by: Eddie Dong --- devicemodel/hw/platform/usb_mouse.c | 2 -- devicemodel/include/usb.h | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/devicemodel/hw/platform/usb_mouse.c b/devicemodel/hw/platform/usb_mouse.c index 1b9220c82..1081b5c7d 100644 --- a/devicemodel/hw/platform/usb_mouse.c +++ b/devicemodel/hw/platform/usb_mouse.c @@ -310,8 +310,6 @@ umouse_init(void *pdata, char *opt) return dev; } -#define UREQ(x, y) ((x) | ((y) << 8)) - static int umouse_request(void *scarg, struct usb_data_xfer *xfer) { diff --git a/devicemodel/include/usb.h b/devicemodel/include/usb.h index b789e38ab..950afc088 100644 --- a/devicemodel/include/usb.h +++ b/devicemodel/include/usb.h @@ -107,6 +107,7 @@ #define USB_BUS_RESET_DELAY 100 /* ms */ +#define UREQ(x, y) ((x) | ((y) << 8)) /* * USB record layout in memory: *