Skip to content

Commit 83b2cb4

Browse files
jhnikulaWolfram Sang
authored andcommitted
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 <andriy.shevchenko@linux.intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
1 parent 3aca0bd commit 83b2cb4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/i2c/busses/i2c-designware-common.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
#include <linux/io.h>
3232
#include <linux/module.h>
3333
#include <linux/pm_runtime.h>
34+
#include <linux/swab.h>
3435

3536
#include "i2c-designware-core.h"
3637

@@ -113,7 +114,7 @@ int i2c_dw_set_reg_access(struct dw_i2c_dev *dev)
113114
reg = dw_readl(dev, DW_IC_COMP_TYPE);
114115
i2c_dw_release_lock(dev);
115116

116-
if (reg == ___constant_swab32(DW_IC_COMP_TYPE_VALUE)) {
117+
if (reg == swab32(DW_IC_COMP_TYPE_VALUE)) {
117118
/* Configure register endianess access */
118119
dev->flags |= ACCESS_SWAP;
119120
} else if (reg == (DW_IC_COMP_TYPE_VALUE & 0x0000ffff)) {

0 commit comments

Comments
 (0)