Skip to content

Commit 7c2fc79

Browse files
Chen Livinodkoul
authored andcommitted
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 <[email protected]> Reviewed-by: Al Cooper <[email protected]> Acked-by: Florian Fainelli <[email protected]> Fixes: 94583a4 ("phy: usb: Restructure in preparation for adding 7216 USB support") Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
1 parent 6efb943 commit 7c2fc79

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/phy/broadcom/phy-brcm-usb-init.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ static inline u32 brcm_usb_readl(void __iomem *addr)
7878
* Other architectures (e.g., ARM) either do not support big endian, or
7979
* else leave I/O in little endian mode.
8080
*/
81-
if (IS_ENABLED(CONFIG_MIPS) && IS_ENABLED(__BIG_ENDIAN))
81+
if (IS_ENABLED(CONFIG_MIPS) && IS_ENABLED(CONFIG_CPU_BIG_ENDIAN))
8282
return __raw_readl(addr);
8383
else
8484
return readl_relaxed(addr);
@@ -87,7 +87,7 @@ static inline u32 brcm_usb_readl(void __iomem *addr)
8787
static inline void brcm_usb_writel(u32 val, void __iomem *addr)
8888
{
8989
/* 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))
9191
__raw_writel(val, addr);
9292
else
9393
writel_relaxed(val, addr);

0 commit comments

Comments
 (0)