diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2006-12-28 15:27:27 +1100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-02-07 15:44:32 -0800 |
commit | d728e327d4f86df439fa6b6f2f64b278394a58cc (patch) | |
tree | 8c2ae0f2e471ee76d0ccf04badcb387982e63557 /drivers/usb/host/ehci.h | |
parent | b32e904d54d163c6f97fc3c7586d381f4f11c3a5 (diff) | |
download | op-kernel-dev-d728e327d4f86df439fa6b6f2f64b278394a58cc.zip op-kernel-dev-d728e327d4f86df439fa6b6f2f64b278394a58cc.tar.gz |
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: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'drivers/usb/host/ehci.h')
-rw-r--r-- | drivers/usb/host/ehci.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/usb/host/ehci.h b/drivers/usb/host/ehci.h index 5f28b74..3ce7249 100644 --- a/drivers/usb/host/ehci.h +++ b/drivers/usb/host/ehci.h @@ -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 } /*-------------------------------------------------------------------------*/ |