From patchwork Thu Aug 15 15:53:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Nosthoff X-Patchwork-Id: 11095927 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 1CB14112C for ; Thu, 15 Aug 2019 15:59:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0F280286BE for ; Thu, 15 Aug 2019 15:59:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 02EF928968; Thu, 15 Aug 2019 15:59:02 +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 6768328972 for ; Thu, 15 Aug 2019 15:59:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729251AbfHOP7C (ORCPT ); Thu, 15 Aug 2019 11:59:02 -0400 Received: from mail.heine.tech ([195.201.24.99]:44184 "EHLO mail.heine.tech" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728662AbfHOP7B (ORCPT ); Thu, 15 Aug 2019 11:59:01 -0400 X-Greylist: delayed 332 seconds by postgrey-1.27 at vger.kernel.org; Thu, 15 Aug 2019 11:59:01 EDT Received: from localhost (localhost [127.0.0.1]) (Authenticated sender: michael@nosthoff.rocks) by mail.heine.tech (Postcow) with ESMTPSA id 8A6D11814A1; Thu, 15 Aug 2019 17:53:27 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heine.so; s=dkim; t=1565884407; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=BE1Zy5Qog+TxzY8S3tJkSl6a3YgdLE5ERaIG4+hlWjA=; b=dKS+jggoEJ3y6kCqy+xQfwW2KyZFLUFkQwQR0qAnACo0btZSpl6xa+mE1PqU+3aFr+PsKw PuY9B+kjsZUSFcG8rYuWJNNfi+1yHc0JM4mVoIKeCW3R47Yjb20FJEtK1vfn7zovppe+gA hps03dtZ9mx74tjSnu+nKFNM97SWrKw= From: Michael Nosthoff To: linux-pm@vger.kernel.org Cc: briannorris@chromium.org, Michael Nosthoff Subject: [PATCH] power: supply: sbs-battery: use correct flags field Date: Thu, 15 Aug 2019 17:53:22 +0200 Message-Id: <20190815155322.20923-1-committed@heine.so> MIME-Version: 1.0 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 the type flag is stored in the chip->flags field not in the client->flags field. This currently leads to never using the ti specific function but always falling back to the general one. Signed-off-by: Michael Nosthoff Reviewed-by: Brian Norris --- drivers/power/supply/sbs-battery.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/power/supply/sbs-battery.c b/drivers/power/supply/sbs-battery.c index 048d205d7074..2e86cc1e0e35 100644 --- a/drivers/power/supply/sbs-battery.c +++ b/drivers/power/supply/sbs-battery.c @@ -620,7 +620,7 @@ static int sbs_get_property(struct power_supply *psy, switch (psp) { case POWER_SUPPLY_PROP_PRESENT: case POWER_SUPPLY_PROP_HEALTH: - if (client->flags & SBS_FLAGS_TI_BQ20Z75) + if (chip->flags & SBS_FLAGS_TI_BQ20Z75) ret = sbs_get_ti_battery_presence_and_health(client, psp, val); else