From 83b2cb48cbc5c4196fcc9357836f30713f74dbc2 Mon Sep 17 00:00:00 2001 From: Jarkko Nikula Date: Tue, 19 Jun 2018 14:23:20 +0300 Subject: [PATCH] i2c: designware: Don't use internal ___constant_swab32 It looks ___constant_swab32 is an internal byte swap detail. Switch to swap32() and include header file for it explicitly. Now it comes implicitly via linux/i2c.h include. Suggested-by: Andy Shevchenko Reviewed-by: Andy Shevchenko Signed-off-by: Jarkko Nikula Signed-off-by: Wolfram Sang --- drivers/i2c/busses/i2c-designware-common.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/i2c/busses/i2c-designware-common.c b/drivers/i2c/busses/i2c-designware-common.c index d1c93acabfcf..59156046f2d0 100644 --- a/drivers/i2c/busses/i2c-designware-common.c +++ b/drivers/i2c/busses/i2c-designware-common.c @@ -31,6 +31,7 @@ #include #include #include +#include #include "i2c-designware-core.h" @@ -113,7 +114,7 @@ int i2c_dw_set_reg_access(struct dw_i2c_dev *dev) reg = dw_readl(dev, DW_IC_COMP_TYPE); i2c_dw_release_lock(dev); - if (reg == ___constant_swab32(DW_IC_COMP_TYPE_VALUE)) { + if (reg == swab32(DW_IC_COMP_TYPE_VALUE)) { /* Configure register endianess access */ dev->flags |= ACCESS_SWAP; } else if (reg == (DW_IC_COMP_TYPE_VALUE & 0x0000ffff)) { -- GitLab