From patchwork Fri Apr 3 08:46: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: 11472145 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5778992C for ; Fri, 3 Apr 2020 08:47:30 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 312A0206E9 for ; Fri, 3 Apr 2020 08:47:30 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="IwGuX9hp" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 312A0206E9 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=fi.rohmeurope.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ZAxXmGXEUFGJoog0kpDEFTlD7HrE3LVDlf4Se14JD6c=; b=IwGuX9hp/1FlF3 /aG0iouBK6QuBYB7ZhhpoHaWtsViEQbvJbdbKvcDv1o6sxKUuiRLKXfXwB5mxMt+mMKc0zIRKmBiO HYJhlUY8O62SF8Bs8w7aNhhXKaMlxup4PcVvFJlcbPkdb7FvvVC8s3GXPcPnUbDFVcuxs0qvVAVUJ n9xQEIHtY88q8cdqGHdCdQY8TQk1NoaK/CQaeuw7E8KeCdXM4tEKS2cJ5hCzUDdRNyL8bAN5oMN2Z keLLvVW0sgm+h4AtsMe6IyCG9sFJCQEqmne+UJ2oU7GrWzrMPgkhWr6u99nYIHIzAPwth18qYCABb d4XlvMzPlprAZ9/5Yx0A==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jKHz4-0001al-RR; Fri, 03 Apr 2020 08:47:26 +0000 Received: from mail-lj1-f194.google.com ([209.85.208.194]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jKHyJ-0000eG-KJ; Fri, 03 Apr 2020 08:46:42 +0000 Received: by mail-lj1-f194.google.com with SMTP id p14so6102965lji.11; Fri, 03 Apr 2020 01:46:39 -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=jZ+LI7bvlTrchtOJ1bUq78fKse0D2WJfGD+rvVcpqQg=; b=SP4djmKF6/OO5ikH9ba41F5D4MroanJ9iN1xfNwwrsDqW2UUUfDgzB/5ps4S6Mpaq5 7nUiERTF3Ck4sBzoarA9DMe16gXOQG5UhPzqhjAxm0yt/Bw+AbAA9A++s4jY8UZ6Ecwv GvT9Ln77vjOpcZ3f6l+bdorO7pnWzt6NjGtLIFZFAYPy3/sX6hb4D8s/5SZFNkybcZ5t UceFc+KJK2eih89xjZP1ZaTbsh2eFlX4PIcsP5mLR/Ar1Kekiab5658rMyJ64TRvVIGu W8kCK3269JqoABkQSr0kfHTXJCoJiiHaV40malrJVmMte3u9spYP0IndVoBcCvdQfnA0 AuYg== X-Gm-Message-State: AGi0PubNe1AKkTO7/Khoea3UXhjzTZsI5kQQAHePNhg2ewdhNCZEXdoO 689yXnSKrv4KIwX2uJsLYrg= X-Google-Smtp-Source: APiQypLxW+r3pmciCOntyOg7cFCl2hC86/uHqDNKBq4EpOfxk5oShDklxQkI/ScFtLRRKgYXKpg79g== X-Received: by 2002:a2e:9d85:: with SMTP id c5mr4196515ljj.168.1585903598120; Fri, 03 Apr 2020 01:46:38 -0700 (PDT) Received: from localhost.localdomain (dc7t7ryyyyyyyyyyyyybt-3.rev.dnainternet.fi. [2001:14ba:16e1:b700::3]) by smtp.gmail.com with ESMTPSA id a26sm4428547ljn.22.2020.04.03.01.46.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Apr 2020 01:46:37 -0700 (PDT) Date: Fri, 3 Apr 2020 11:46:30 +0300 From: Matti Vaittinen To: matti.vaittinen@fi.rohmeurope.com, mazziesaccount@gmail.com Subject: [PATCH v8 05/10] power: supply: bd70528: rename linear_range to avoid collision Message-ID: <7a6727838bcc93f443c993d91d21d9306dee22be.1585902279.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) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200403_014640_444281_075147F7 X-CRM114-Status: GOOD ( 15.43 ) X-Spam-Score: 0.5 (/) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (0.5 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.208.194 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.208.194 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [mazziesaccount[at]gmail.com] 0.2 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Andrei Stefanescu , Heiko Stuebner , "Rafael J. Wysocki" , Tony Lindgren , Linus Walleij , Brendan Higgins , Sebastian Reichel , Andreas Kemnade , "Angelo G. Del Regno" , Hsin-Hsiung Wang , linux-samsung-soc@vger.kernel.org, Andy Shevchenko , Axel Lin , Gregory CLEMENT , linux-pm@vger.kernel.org, Krzysztof Kozlowski , Markus Reichl , Bartosz Golaszewski , Chen-Yu Tsai , Andy Gross , markus.laine@fi.rohmeurope.com, Adam Thomson , devicetree@vger.kernel.org, Charles Keepax , linux-omap@vger.kernel.org, Bartlomiej Zolnierkiewicz , linux-arm-msm@vger.kernel.org, Richard Fitzgerald , Mark Brown , linux-mediatek@lists.infradead.org, Matthias Brugger , Thomas Gleixner , Bjorn Andersson , linux-arm-kernel@lists.infradead.org, Support Opensource , Baolin Wang , Sangbeom Kim , Greg Kroah-Hartman , Randy Dunlap , Matti Vaittinen , Liam Girdwood , linux-kernel@vger.kernel.org, mikko.mutanen@fi.rohmeurope.com, Vinod Koul , Rob Herring , patches@opensource.cirrus.com Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.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 Reviewed-by: Sebastian Reichel --- No changes since v7 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) {