From patchwork Fri Apr 3 20:20:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?TWljaGHFgiBNaXJvc8WCYXc=?= X-Patchwork-Id: 212394 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=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham 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 D6E92C43331 for ; Fri, 3 Apr 2020 20:20:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A4B0B207FF for ; Fri, 3 Apr 2020 20:20:37 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=rere.qmqm.pl header.i=@rere.qmqm.pl header.b="Sev2Is24" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728168AbgDCUUg (ORCPT ); Fri, 3 Apr 2020 16:20:36 -0400 Received: from rere.qmqm.pl ([91.227.64.183]:27349 "EHLO rere.qmqm.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727842AbgDCUUg (ORCPT ); Fri, 3 Apr 2020 16:20:36 -0400 Received: from remote.user (localhost [127.0.0.1]) by rere.qmqm.pl (Postfix) with ESMTPSA id 48vBBn5f29z1th; Fri, 3 Apr 2020 22:20:33 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=rere.qmqm.pl; s=1; t=1585945233; bh=fseErXmDkX64tuP/VBZQqH12qqnxX3YPVLXIds6NfEI=; h=Date:In-Reply-To:References:From:Subject:To:Cc:From; b=Sev2Is24W31jAIfgP5RNxcie7xoiBgYEQAISAsqZb786EeHIUZdwjd79Onl0SQlC9 EQmva5mmbOl7sqAx3Cyz4TFQgJ3mi7nywa2MXxDu4n3oNQRzDE0YwjJwFQFkvrtyoC ZZgS+1ecAXQxq3HGlNXTtCEhIe4W4j4rq2Rg5gMJAQ2iB9GJ+G6zxG3rqQhZo04Vb6 s8ZygMtiiGeEyk58liLxFrTldf4xWaWCy2+H8QrfG5i/fWGWdUagPzyJ7DG64wtUxU EnRiYnmdM2erixluvcbLtazWXrp1oRf1R+RoFRolLefaxGenwrRld+wQqD6S9aNq2X J/5yHFO/HrKJA== X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.102.2 at mail Date: Fri, 03 Apr 2020 22:20:33 +0200 Message-Id: <4c33741ba56d3c7830827c140bccf13621e59232.1585944770.git.mirq-linux@rere.qmqm.pl> In-Reply-To: References: From: =?utf-8?b?TWljaGHFgiBNaXJvc8WCYXc=?= Subject: [PATCH v3 06/11] power: supply: core: fix HWMON temperature labels MIME-Version: 1.0 To: Sebastian Reichel , Andrey Smirnov , Guenter Roeck Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org tempX_label files are swapped compared to what power_supply_hwmon_temp_to_property() uses. Make them match. Cc: stable@vger.kernel.org Fixes: e67d4dfc9ff1 ("power: supply: Add HWMON compatibility layer") Signed-off-by: Michał Mirosław --- v2: split parameter checking to separate patch --- drivers/power/supply/power_supply_hwmon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/power/supply/power_supply_hwmon.c b/drivers/power/supply/power_supply_hwmon.c index 75cf861ba492..67b6ee60085e 100644 --- a/drivers/power/supply/power_supply_hwmon.c +++ b/drivers/power/supply/power_supply_hwmon.c @@ -144,7 +144,7 @@ static int power_supply_hwmon_read_string(struct device *dev, u32 attr, int channel, const char **str) { - *str = channel ? "temp" : "temp ambient"; + *str = channel ? "temp ambient" : "temp"; return 0; }