提交 d728e327 编写于 作者: B Benjamin Herrenschmidt 提交者: Greg Kroah-Hartman

USB: Fix EHCI warning

This patch fixes a warning introduced by the big endian MMIO EHCI
support patch on platforms that don't have readl_be/writel_be variants
(though mostly harmless as those are called in an if (0) statement,
but gcc still warns).
Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
上级 b32e904d
...@@ -671,17 +671,25 @@ ehci_port_speed(struct ehci_hcd *ehci, unsigned int portsc) ...@@ -671,17 +671,25 @@ ehci_port_speed(struct ehci_hcd *ehci, unsigned int portsc)
static inline unsigned int ehci_readl (const struct ehci_hcd *ehci, static inline unsigned int ehci_readl (const struct ehci_hcd *ehci,
__u32 __iomem * regs) __u32 __iomem * regs)
{ {
#ifdef CONFIG_USB_EHCI_BIG_ENDIAN_MMIO
return ehci_big_endian_mmio(ehci) ? return ehci_big_endian_mmio(ehci) ?
readl_be((__force u32 *)regs) : readl_be((__force u32 *)regs) :
readl((__force u32 *)regs); readl((__force u32 *)regs);
#else
return readl((__force u32 *)regs);
#endif
} }
static inline void ehci_writel (const struct ehci_hcd *ehci, static inline void ehci_writel (const struct ehci_hcd *ehci,
const unsigned int val, __u32 __iomem *regs) const unsigned int val, __u32 __iomem *regs)
{ {
#ifdef CONFIG_USB_EHCI_BIG_ENDIAN_MMIO
ehci_big_endian_mmio(ehci) ? ehci_big_endian_mmio(ehci) ?
writel_be(val, (__force u32 *)regs) : writel_be(val, (__force u32 *)regs) :
writel(val, (__force u32 *)regs); writel(val, (__force u32 *)regs);
#else
writel(val, (__force u32 *)regs);
#endif
} }
/*-------------------------------------------------------------------------*/ /*-------------------------------------------------------------------------*/
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册