From patchwork Tue Jun 12 11:22:00 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jarkko Nikula X-Patchwork-Id: 928279 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-i2c-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.intel.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 414nX40WfTz9s1B for ; Tue, 12 Jun 2018 21:21:40 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932800AbeFLLVj (ORCPT ); Tue, 12 Jun 2018 07:21:39 -0400 Received: from mga02.intel.com ([134.134.136.20]:61105 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932555AbeFLLVj (ORCPT ); Tue, 12 Jun 2018 07:21:39 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Jun 2018 04:21:38 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,214,1526367600"; d="scan'208";a="56660765" Received: from mylly.fi.intel.com (HELO mylly.fi.intel.com.) ([10.237.72.150]) by FMSMGA003.fm.intel.com with ESMTP; 12 Jun 2018 04:21:37 -0700 From: Jarkko Nikula To: linux-i2c@vger.kernel.org Cc: Wolfram Sang , Andy Shevchenko , Mika Westerberg , Jarkko Nikula Subject: [PATCH v4 3/8] i2c: designware: Don't use internal ___constant_swab32 Date: Tue, 12 Jun 2018 14:22:00 +0300 Message-Id: <20180612112205.11200-4-jarkko.nikula@linux.intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180612112205.11200-1-jarkko.nikula@linux.intel.com> References: <20180612112205.11200-1-jarkko.nikula@linux.intel.com> Sender: linux-i2c-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org 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 --- v2: Keep include statement order --- 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)) {