From mboxrd@z Thu Jan 1 00:00:00 1970 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=-6.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT 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 C7E01C10F14 for ; Thu, 10 Oct 2019 08:45:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9ECBD2190F for ; Thu, 10 Oct 2019 08:45:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1570697135; bh=RXDJvWVTo8lu8kyUI4kAD6p3ZVPAu2fNww1xcGZrX4k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=He0cMqAbgcYhkC3avAH7Sv0JXzRoE4VZWqUhtK2C3F5m2BNTyhQv+/R6c/rNXkZ3q tUoWGJTRYLFI79gDZS3cVzykcZnhMRGp98tZLzQw+78+/H7fyGx9G6kpH3NlbXj3gP bn3gJqya4ryghqnItnuSNCa97LkLn6U7maIr8PgE= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388100AbfJJIpe (ORCPT ); Thu, 10 Oct 2019 04:45:34 -0400 Received: from mail.kernel.org ([198.145.29.99]:51054 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387494AbfJJIp2 (ORCPT ); Thu, 10 Oct 2019 04:45:28 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 03F832190F; Thu, 10 Oct 2019 08:45:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1570697127; bh=RXDJvWVTo8lu8kyUI4kAD6p3ZVPAu2fNww1xcGZrX4k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sQALHGGAAqsHL+7CVE8izClpb0U01OVRskpHDNSlOLFngpMDaApXQ7ELFAM1O9A7T rca4Ul7w6PwwIiBvRyujOEvIsip6lDTP00bHPsegEWXOvBY669guRvChDq3ISlgJKk g/gxo+GbUBiHyAxNQXmLyeetRI58qPxPM88LMn+k= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Michael Nosthoff , Brian Norris , Enric Balletbo i Serra , Sebastian Reichel Subject: [PATCH 4.19 028/114] power: supply: sbs-battery: use correct flags field Date: Thu, 10 Oct 2019 10:35:35 +0200 Message-Id: <20191010083558.685954681@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191010083544.711104709@linuxfoundation.org> References: <20191010083544.711104709@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Michael Nosthoff commit 99956a9e08251a1234434b492875b1eaff502a12 upstream. 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 health function as client->flags doesn't use that bit. So it's always falling back to the general one. Fixes: 76b16f4cdfb8 ("power: supply: sbs-battery: don't assume MANUFACTURER_DATA formats") Cc: Signed-off-by: Michael Nosthoff Reviewed-by: Brian Norris Reviewed-by: Enric Balletbo i Serra Signed-off-by: Sebastian Reichel Signed-off-by: Greg Kroah-Hartman --- drivers/power/supply/sbs-battery.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/power/supply/sbs-battery.c +++ b/drivers/power/supply/sbs-battery.c @@ -629,7 +629,7 @@ static int sbs_get_property(struct power 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