Skip to content

Commit

Permalink
USB: Fix EHCI warning
Browse files Browse the repository at this point in the history
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: Benjamin Herrenschmidt <benh@kernel.crashing.org>
  • Loading branch information
Benjamin Herrenschmidt authored and Greg Kroah-Hartman committed Feb 7, 2007
1 parent b32e904 commit d728e32
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions drivers/usb/host/ehci.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
__u32 __iomem * regs)
{
#ifdef CONFIG_USB_EHCI_BIG_ENDIAN_MMIO
return ehci_big_endian_mmio(ehci) ?
readl_be((__force u32 *)regs) :
readl((__force u32 *)regs);
#else
return readl((__force u32 *)regs);
#endif
}

static inline void ehci_writel (const struct ehci_hcd *ehci,
const unsigned int val, __u32 __iomem *regs)
{
#ifdef CONFIG_USB_EHCI_BIG_ENDIAN_MMIO
ehci_big_endian_mmio(ehci) ?
writel_be(val, (__force u32 *)regs) :
writel(val, (__force u32 *)regs);
#else
writel(val, (__force u32 *)regs);
#endif
}

/*-------------------------------------------------------------------------*/
Expand Down

0 comments on commit d728e32

Please sign in to comment.