From patchwork Wed Mar 18 11:51:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Vaittinen, Matti" X-Patchwork-Id: 212552 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 45A2CC5ACD6 for ; Wed, 18 Mar 2020 11:51:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1F7D720770 for ; Wed, 18 Mar 2020 11:51:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726845AbgCRLvc (ORCPT ); Wed, 18 Mar 2020 07:51:32 -0400 Received: from mail-lj1-f193.google.com ([209.85.208.193]:43982 "EHLO mail-lj1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726586AbgCRLvc (ORCPT ); Wed, 18 Mar 2020 07:51:32 -0400 Received: by mail-lj1-f193.google.com with SMTP id r7so26657939ljp.10; Wed, 18 Mar 2020 04:51:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=QwdQ3iVZZgrPlZePwEbrctVN53vH0orT5NcOixtFYXo=; b=ZrE7JFJVYJjDzSenoDDjUXVj2m8Vm9vtmSC9/sBi6BVQBM2L10KWZyvK7zw4xxywUZ 4uvVoV8f6H8mobYd/wSftig0b/w6OpfrYhrGgzuS/KH7PijIaSaM7EIBWQhGXH+c0XX4 6StBZvVv5d2jSu5NqZND+mhFfL7znUAs7Eis60SC7UdscCEUhS6Du0CWd8y8UtXbRxr8 lNJ8BnVtLdWWsgP1feKKLvf8kDPStH5ZnzjCkUiO/N7f289izCAgjWu/vi18eDd2/lPd t/Z6x66wHF/WycwVvuZNTppm+wqa0XHQSvZsXPU+Udhu4S9OQwwv/3Rd6BhgJ846BABF rD9w== X-Gm-Message-State: ANhLgQ3t8VReArFnMyEfyFEVBpoEXwVW1eF7VrJt6pnZO78dcqnx/BKz x4trsp17HTX4l95UUeYvpeI= X-Google-Smtp-Source: ADFU+vv1mNVhj2Zlm7auffiBwuZNSblRykCkDkgP8+cbU9vVpLOiR58dz1HPvauuNrdkK3NhVpRTqg== X-Received: by 2002:a2e:97cf:: with SMTP id m15mr2108122ljj.30.1584532289046; Wed, 18 Mar 2020 04:51:29 -0700 (PDT) Received: from localhost.localdomain (dc7t7ryyyyyyyyyyyyybt-3.rev.dnainternet.fi. [2001:14ba:16e1:b700::3]) by smtp.gmail.com with ESMTPSA id p14sm4191329ljn.80.2020.03.18.04.51.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Mar 2020 04:51:28 -0700 (PDT) Date: Wed, 18 Mar 2020 13:51:22 +0200 From: Matti Vaittinen To: matti.vaittinen@fi.rohmeurope.com, mazziesaccount@gmail.com Cc: Sebastian Reichel , Rob Herring , Mark Rutland , Greg Kroah-Hartman , "Rafael J. Wysocki" , Liam Girdwood , Mark Brown , Matti Vaittinen , linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Markus Laine , Mikko Mutanen Subject: [PATCH v5 4/9] power: supply: bd70528: rename linear_range to avoid collision Message-ID: <24001f14f26002c138028c7550578c2b0f8175c8.1584468798.git.matti.vaittinen@fi.rohmeurope.com> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.12.1 (2019-06-15) Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Follow-up patches in this series will add a generic struct linear_range. Rename bd70528 internal struct to avoid collision. Signed-off-by: Matti Vaittinen --- No changes since v4 (only rebased) drivers/power/supply/bd70528-charger.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/power/supply/bd70528-charger.c b/drivers/power/supply/bd70528-charger.c index b8e1ec106627..3b820110ecfa 100644 --- a/drivers/power/supply/bd70528-charger.c +++ b/drivers/power/supply/bd70528-charger.c @@ -335,14 +335,14 @@ static int bd70528_get_present(struct bd70528_psy *bdpsy, int *val) return 0; } -struct linear_range { +struct bd70528_linear_range { int min; int step; int vals; int low_sel; }; -static const struct linear_range current_limit_ranges[] = { +static const struct bd70528_linear_range current_limit_ranges[] = { { .min = 5, .step = 1, @@ -374,7 +374,7 @@ static const struct linear_range current_limit_ranges[] = { * voltage for low temperatures. The driver currently only reads * the charge current at room temperature. We do set both though. */ -static const struct linear_range warm_charge_curr[] = { +static const struct bd70528_linear_range warm_charge_curr[] = { { .min = 10, .step = 10, @@ -398,7 +398,7 @@ static const struct linear_range warm_charge_curr[] = { #define MAX_WARM_CHG_CURR_SEL 0x1f #define MIN_CHG_CURR_SEL 0x0 -static int find_value_for_selector_low(const struct linear_range *r, +static int find_value_for_selector_low(const struct bd70528_linear_range *r, int selectors, unsigned int sel, unsigned int *val) { @@ -420,7 +420,7 @@ static int find_value_for_selector_low(const struct linear_range *r, * I guess it is enough if we use voltage/current which is closest (below) * the requested? */ -static int find_selector_for_value_low(const struct linear_range *r, +static int find_selector_for_value_low(const struct bd70528_linear_range *r, int selectors, unsigned int val, unsigned int *sel, bool *found) {