From patchwork Mon Nov 12 10:52:38 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "(Exiting) Baolin Wang" X-Patchwork-Id: 10678495 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A508313B5 for ; Mon, 12 Nov 2018 10:53:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9482529E25 for ; Mon, 12 Nov 2018 10:53:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8820B29EFE; Mon, 12 Nov 2018 10:53:24 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3AFFB29E25 for ; Mon, 12 Nov 2018 10:53:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729295AbeKLUp7 (ORCPT ); Mon, 12 Nov 2018 15:45:59 -0500 Received: from mail-pg1-f196.google.com ([209.85.215.196]:45255 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729281AbeKLUp6 (ORCPT ); Mon, 12 Nov 2018 15:45:58 -0500 Received: by mail-pg1-f196.google.com with SMTP id y4so3897312pgc.12 for ; Mon, 12 Nov 2018 02:53:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=FwjO0MD8IjFvB0k6XnXwl4d6sfbxSCkhEER4jXSCxHs=; b=VJXf+H8jSteGTRTA3h1R6PCMsuMqpxwracH6HnMorGhA7ANZROK/7P0lQr5KXQlAmC nUpKF6EzXeTfLXCkD2rMAeirWVg5Deujwh4csS4URC12mu9yRWakMkSJbYVo7y4bik4G jXVyLvEskXCkNYENtjk6RuzoTWx8Rd14vshG8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=FwjO0MD8IjFvB0k6XnXwl4d6sfbxSCkhEER4jXSCxHs=; b=PZE8VTc17X0AcDaCfdOQuEL+IygK3K8aWqBE1IfbL5oeKKfkMq2L9N8HHD+HEuVNDw NuJLJZPryRvZGbial7LLYHzJmnhWokTMKBNXJ+2jKbZNgo/V0mmPMTP4AMPNQw+fFDhq c9PCXc7holxLqZlTK0/spswuYP1wgiWBAQNTY3zF3pyzTyFb/sR0HThwa69TjBdvSv5n xIdcoaRZNUMokQrC5AF0YM7dJXYmmWeBkoILcZy4/BkMEsv75qV3OQRxJ8eEUfC/kvZ/ NVKzBDTTNa+jrpNXtIG1x7DMnizKUdN+iOU+gbb5T3UJ1GsDRWshvXv5eJh4URLbC+Zo ZSNw== X-Gm-Message-State: AGRZ1gKhKlpxpxD+eofnsusTKoOPEA3SVsrNdffekWanljL5U9eLf73I asVHrWPFF+jU9RSfPQt+dFfWFw== X-Google-Smtp-Source: AJdET5e7ViAl/kTVAsa2ImwcosG9aOkE3Gme8rhQ4rEaAT19JPeIkydmx2wcpL1lnwa14DymwfpKEw== X-Received: by 2002:a63:1a4b:: with SMTP id a11mr404110pgm.254.1542019995522; Mon, 12 Nov 2018 02:53:15 -0800 (PST) Received: from baolinwangubtpc.spreadtrum.com ([117.18.48.102]) by smtp.gmail.com with ESMTPSA id 186-v6sm17545705pfe.39.2018.11.12.02.53.12 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 12 Nov 2018 02:53:14 -0800 (PST) From: Baolin Wang To: sre@kernel.org Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, yuanjiang.yu@unisoc.com, baolin.wang@linaro.org, broonie@kernel.org Subject: [PATCH 4/4] power: supply: sc2731_charger: Free battery information Date: Mon, 12 Nov 2018 18:52:38 +0800 Message-Id: X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <5d096dec07f6808a70edcfaad6e8f77039f21a9b.1542019800.git.baolin.wang@linaro.org> References: <5d096dec07f6808a70edcfaad6e8f77039f21a9b.1542019800.git.baolin.wang@linaro.org> In-Reply-To: <5d096dec07f6808a70edcfaad6e8f77039f21a9b.1542019800.git.baolin.wang@linaro.org> References: <5d096dec07f6808a70edcfaad6e8f77039f21a9b.1542019800.git.baolin.wang@linaro.org> Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Free battery information in case of adding battery OCV tables. Signed-off-by: Baolin Wang --- drivers/power/supply/sc2731_charger.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/power/supply/sc2731_charger.c b/drivers/power/supply/sc2731_charger.c index 49b3f0c..335cb85 100644 --- a/drivers/power/supply/sc2731_charger.c +++ b/drivers/power/supply/sc2731_charger.c @@ -408,6 +408,8 @@ static int sc2731_charger_hw_init(struct sc2731_charger_info *info) vol_val = (term_voltage - 4200) / 100; else vol_val = 0; + + power_supply_put_battery_info(info->psy_usb, &bat_info); } /* Set charge termination current */