提交 4a755f1d 编写于 作者: L Lijun Pan 提交者: Tom Rini

driver/usb: include upper/lower_32_bits() from linux/compat.h

upper_32_bits() and lower_32_bits() have been ported into linux/compat.h.
Start use them now in drivers/usb/host/xhci.h.
Signed-off-by: NLijun Pan <Lijun.Pan@freescale.com>
上级 8f2df5d3
...@@ -20,9 +20,7 @@ ...@@ -20,9 +20,7 @@
#include <asm/cache.h> #include <asm/cache.h>
#include <asm/io.h> #include <asm/io.h>
#include <linux/list.h> #include <linux/list.h>
#include <linux/compat.h>
#define upper_32_bits(n) (u32)((n) >> 32)
#define lower_32_bits(n) (u32)(n)
#define MAX_EP_CTX_NUM 31 #define MAX_EP_CTX_NUM 31
#define XHCI_ALIGNMENT 64 #define XHCI_ALIGNMENT 64
...@@ -1121,7 +1119,7 @@ static inline void xhci_writeq(__le64 volatile *regs, const u64 val) ...@@ -1121,7 +1119,7 @@ static inline void xhci_writeq(__le64 volatile *regs, const u64 val)
__u32 *ptr = (__u32 *)regs; __u32 *ptr = (__u32 *)regs;
u32 val_lo = lower_32_bits(val); u32 val_lo = lower_32_bits(val);
/* FIXME */ /* FIXME */
u32 val_hi = 0; u32 val_hi = upper_32_bits(val);
writel(val_lo, ptr); writel(val_lo, ptr);
writel(val_hi, ptr + 1); writel(val_hi, ptr + 1);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册