Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp2072643ybp; Thu, 10 Oct 2019 01:41:00 -0700 (PDT) X-Google-Smtp-Source: APXvYqwUYBkyuJeP6OSpCKg+dxQkPzNr9bKg60lF1oLFk2WHBwJ8CuH1alV3Gul2CDW5a4vmygbt X-Received: by 2002:aa7:ca59:: with SMTP id j25mr6993247edt.78.1570696860762; Thu, 10 Oct 2019 01:41:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570696860; cv=none; d=google.com; s=arc-20160816; b=Aa1l4lhgf4tWaRGdwKlV4i/ChEiKNDbLoDVYnZJE9T3wRqwkpZ6UB42ZNzjoesY5ec /oDHHU0vsQ3yySi1LpvEbHnngxFKrQ79Z9IDrKRNXYIIC9e/69mu16TsSQC84/ihyYC5 57M+zGXAi3qxgi1aIemddXBeiVkZEEyXovAUmX87X7k2bbN9kXHMCWBIhvm3GSb80js6 OhDlZ0XyLgcgnR2e8gNfbEVA3BCNwSi3Yq45MsXhWyV7/he9FJMhpnSwvxRtHtHOedMP JvqC5vKwGJyiyjMtXwjE7SkpAfcSJe4zA9zrYKO6Zn2k8qEG1fr8Vy+w3X51qKyIihz3 8PnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=yXSSY5MLneH28IyOn8LPuRioZnghPf9kvMHbULfiwm0=; b=tCTcEzv4YuK7cHtJork9oILlYbCk6DInpeYzuBc1NgxjjdXgMz833cqaRMTrn8+Lao fYIDlhNpct+U20hmZDsAjQZn2Gk8qHntqKVEJkSJ9z99j5nMIJsCD4pbNZjmLnAM/x/u d7Ebi81X57rZSD7fJWttWpJ2jmYFdm/owZ6HB7YlF9PV6eq7Q6X2ulQ7rbn96rb8oO6+ C6Ov48nyut/IDDOBe9r2yu4WXn7SFpcoFap38r1/FvfjIhaHXQw532YYgvO439PzwRP3 JxIu44uZ0cAB3w1gpbG64g9aQIU0M2EBftGYHZyD5ZtIruDOYu3zp/vK7IbUYT3veeGv 0Zgw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ebjzhMyg; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b9si3004358eda.129.2019.10.10.01.40.37; Thu, 10 Oct 2019 01:41:00 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ebjzhMyg; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387894AbfJJIjf (ORCPT + 99 others); Thu, 10 Oct 2019 04:39:35 -0400 Received: from mail.kernel.org ([198.145.29.99]:43176 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387430AbfJJIjd (ORCPT ); Thu, 10 Oct 2019 04:39:33 -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 7879A21920; Thu, 10 Oct 2019 08:39:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1570696773; bh=JhpwYVPZWzsFNd6QwvFFKndx2tJx7saqs/LmQtanksU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ebjzhMygCSZigrkrGQZvXwgFZGT1pVvFsuOUJyJse/gaMLzaYx2eeV3fYYN5gc27C OjPRnHiaN0yx2uKVXNrVWztsrrptIpV+mI64oWKDcqwPQVe5YW9tC/RsDF9tBhDhac 9wMKBX9qglc7kBmOXfJAQj8brCzsAgLxh57EQJyw= 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 5.3 048/148] power: supply: sbs-battery: use correct flags field Date: Thu, 10 Oct 2019 10:35:09 +0200 Message-Id: <20191010083614.052172553@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191010083609.660878383@linuxfoundation.org> References: <20191010083609.660878383@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 @@ -620,7 +620,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