Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

phy: usb: Fix misuse of IS_ENABLED

While IS_ENABLED() is perfectly fine for CONFIG_* symbols, it is not
for other symbols such as __BIG_ENDIAN that is provided directly by
the compiler.

Switch to use CONFIG_CPU_BIG_ENDIAN instead of __BIG_ENDIAN.

Signed-off-by: Chen Li <chenli@uniontech.com>
Reviewed-by: Al Cooper <alcooperx@gmail.com>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Fixes: 94583a41047e ("phy: usb: Restructure in preparation for adding 7216 USB support")
Link: https://lore.kernel.org/r/87czuggpra.wl-chenli@uniontech.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>

authored by

Chen Li and committed by
Vinod Koul
7c2fc792 6efb943b

+2 -2
+2 -2
drivers/phy/broadcom/phy-brcm-usb-init.h
··· 78 78 * Other architectures (e.g., ARM) either do not support big endian, or 79 79 * else leave I/O in little endian mode. 80 80 */ 81 - if (IS_ENABLED(CONFIG_MIPS) && IS_ENABLED(__BIG_ENDIAN)) 81 + if (IS_ENABLED(CONFIG_MIPS) && IS_ENABLED(CONFIG_CPU_BIG_ENDIAN)) 82 82 return __raw_readl(addr); 83 83 else 84 84 return readl_relaxed(addr); ··· 87 87 static inline void brcm_usb_writel(u32 val, void __iomem *addr) 88 88 { 89 89 /* See brcmnand_readl() comments */ 90 - if (IS_ENABLED(CONFIG_MIPS) && IS_ENABLED(__BIG_ENDIAN)) 90 + if (IS_ENABLED(CONFIG_MIPS) && IS_ENABLED(CONFIG_CPU_BIG_ENDIAN)) 91 91 __raw_writel(val, addr); 92 92 else 93 93 writel_relaxed(val, addr);