From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751362AbeAAMjE (ORCPT + 1 other); Mon, 1 Jan 2018 07:39:04 -0500 Received: from mail-pl0-f66.google.com ([209.85.160.66]:39083 "EHLO mail-pl0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751273AbeAAMjD (ORCPT ); Mon, 1 Jan 2018 07:39:03 -0500 X-Google-Smtp-Source: ACJfBov9Ufb83Qh+VJVpPwGoUYIR5HHb0kVpJd2x0gIOY/oOroEA2wYWcgLDmV2Xif0IVxYL8Q/SxA== From: Axel Lin To: Mark Brown Cc: Erick Chen , Baolin Wang , Liam Girdwood , linux-kernel@vger.kernel.org, Axel Lin Subject: [PATCH v2] regulator: sc2731: Fix defines for SC2731_WR_UNLOCK and SC2731_PWR_WR_PROT_VALUE Date: Mon, 1 Jan 2018 20:38:50 +0800 Message-Id: <20180101123850.21936-1-axel.lin@ingics.com> X-Mailer: git-send-email 2.14.1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: The defines for SC2731_WR_UNLOCK and SC2731_PWR_WR_PROT_VALUE makes regmap_write() call looks strange because it takes reg parameter fist then val. Base on Erick's suggestion to define SC2731_PWR_WR_PROT and SC2731_WR_UNLOCK_VALUE instead. Signed-off-by: Axel Lin --- drivers/regulator/sc2731-regulator.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/regulator/sc2731-regulator.c b/drivers/regulator/sc2731-regulator.c index 794fcd504b3d..eb2bdf060b7b 100644 --- a/drivers/regulator/sc2731-regulator.c +++ b/drivers/regulator/sc2731-regulator.c @@ -13,8 +13,8 @@ /* * SC2731 regulator lock register */ -#define SC2731_PWR_WR_PROT_VALUE 0xf0c -#define SC2731_WR_UNLOCK 0x6e7f +#define SC2731_PWR_WR_PROT 0xf0c +#define SC2731_WR_UNLOCK_VALUE 0x6e7f /* * SC2731 enable register @@ -203,8 +203,8 @@ static struct regulator_desc regulators[] = { static int sc2731_regulator_unlock(struct regmap *regmap) { - return regmap_write(regmap, SC2731_PWR_WR_PROT_VALUE, - SC2731_WR_UNLOCK); + return regmap_write(regmap, SC2731_PWR_WR_PROT, + SC2731_WR_UNLOCK_VALUE); } static int sc2731_regulator_probe(struct platform_device *pdev) -- 2.14.1