aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/ehci.h
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2006-12-27 23:27:27 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2007-02-07 18:44:32 -0500
commitd728e327d4f86df439fa6b6f2f64b278394a58cc (patch)
tree8c2ae0f2e471ee76d0ccf04badcb387982e63557 /drivers/usb/host/ehci.h
parentb32e904d54d163c6f97fc3c7586d381f4f11c3a5 (diff)
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.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/usb/host/ehci.h b/drivers/usb/host/ehci.h
index 5f28b74bb8d3..3ce7249085d5 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)
671static inline unsigned int ehci_readl (const struct ehci_hcd *ehci, 671static inline unsigned int ehci_readl (const struct ehci_hcd *ehci,
672 __u32 __iomem * regs) 672 __u32 __iomem * regs)
673{ 673{
674#ifdef CONFIG_USB_EHCI_BIG_ENDIAN_MMIO
674 return ehci_big_endian_mmio(ehci) ? 675 return ehci_big_endian_mmio(ehci) ?
675 readl_be((__force u32 *)regs) : 676 readl_be((__force u32 *)regs) :
676 readl((__force u32 *)regs); 677 readl((__force u32 *)regs);
678#else
679 return readl((__force u32 *)regs);
680#endif
677} 681}
678 682
679static inline void ehci_writel (const struct ehci_hcd *ehci, 683static inline void ehci_writel (const struct ehci_hcd *ehci,
680 const unsigned int val, __u32 __iomem *regs) 684 const unsigned int val, __u32 __iomem *regs)
681{ 685{
686#ifdef CONFIG_USB_EHCI_BIG_ENDIAN_MMIO
682 ehci_big_endian_mmio(ehci) ? 687 ehci_big_endian_mmio(ehci) ?
683 writel_be(val, (__force u32 *)regs) : 688 writel_be(val, (__force u32 *)regs) :
684 writel(val, (__force u32 *)regs); 689 writel(val, (__force u32 *)regs);
690#else
691 writel(val, (__force u32 *)regs);
692#endif
685} 693}
686 694
687/*-------------------------------------------------------------------------*/ 695/*-------------------------------------------------------------------------*/