From patchwork Tue Feb 25 08:53:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Vaittinen, Matti" X-Patchwork-Id: 212740 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.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=ham 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 80A6BC35DF9 for ; Tue, 25 Feb 2020 08:53:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5F69721D7E for ; Tue, 25 Feb 2020 08:53:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729832AbgBYIxp (ORCPT ); Tue, 25 Feb 2020 03:53:45 -0500 Received: from mail-lf1-f68.google.com ([209.85.167.68]:34480 "EHLO mail-lf1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729153AbgBYIxo (ORCPT ); Tue, 25 Feb 2020 03:53:44 -0500 Received: by mail-lf1-f68.google.com with SMTP id l18so9166741lfc.1; Tue, 25 Feb 2020 00:53:43 -0800 (PST) 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=nDkpzkIbHTHFB2KCsxpJEeEEt/VOed+TnbNFIK439eQ=; b=M4xhRnWP+3zT1yUQR6eLcuwwllIfVTmMd7u6zZXLXdcK4HvCXFKWMEIicWInGKWkL8 KNQRT9fM/vBlmURCdNLM5CddWH4FX+9xsFHohpoE0NAO6zXCQR1h186VoW4J9koiBEaa gPItB/GW5BHEuAzkU5JM9kxRWprCfG9bwdbor2HyY8BQwF1Mx2O+rSjN2m+aJ3gyncan cEDVDLzsj4cwjyBES4RtruUtWQOMBBncenIVJ5yTIw5wLMjPGIWCUTLV+ybVJTKs7emk edU0Rvd98IIW2rcKxKjxjPJnZAkPHxkrgHBo1NNJV517SdGjbwaNJur3/CWQh5c3TvTs iDbw== X-Gm-Message-State: APjAAAU3J55eeKLOLNZ/7wZmxqiYhGStMUbZiWmh3DHAKp7biEgB7GhX eOi5JlxTxy5coE3skdRs7Tc= X-Google-Smtp-Source: APXvYqzjfIDtiveEIf7gMME8qCXu96Jyuy/r4a79H5Js/J4aGLqBM4I6M7n+iiqvkx/F65uM990V+w== X-Received: by 2002:a19:ed08:: with SMTP id y8mr6138763lfy.56.1582620822561; Tue, 25 Feb 2020 00:53:42 -0800 (PST) Received: from localhost.localdomain ([213.255.186.46]) by smtp.gmail.com with ESMTPSA id o25sm2079699lfi.89.2020.02.25.00.53.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Feb 2020 00:53:42 -0800 (PST) Date: Tue, 25 Feb 2020 10:53:30 +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 v4 4/9] power: supply: bd70528: rename linear_range to avoid collision Message-ID: <8b09f9548d60b1aeda8bcecf7cee18e7f34c1d62.1582617178.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 --- 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) {