From patchwork Mon Feb 13 18:22:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Armin Wolf X-Patchwork-Id: 56429 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2502340wrn; Mon, 13 Feb 2023 10:29:36 -0800 (PST) X-Google-Smtp-Source: AK7set9IuXbCJp+wYTqwWj6wyjQKFJz5RIkAMoNGI2VU453AUetlecvl9sAtWGeZDYweb0mPotgz X-Received: by 2002:a50:9feb:0:b0:4ac:b3af:1e1 with SMTP id c98-20020a509feb000000b004acb3af01e1mr10641453edf.13.1676312976159; Mon, 13 Feb 2023 10:29:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676312976; cv=none; d=google.com; s=arc-20160816; b=sxHC0iQNWprVp5E1IK4M++hEo9HQRsi6ofWCobeXB7yEvbA8rO/XalFQhwH+UFU0Zt 5U024m+mqg3Qcc7t4y4EHBmeqHKAVAkp0zmbf5pdIL1szapu2JH/LS4V1OqsBXZIMZQA 2gDICpDe1Us4F0oPO7TpJTIXDLGiJmK4Jok8lPs5TAatTq0Kx2InCKDFuz5ZW0iZjmNm S5qEafEiosVcza8w1TDXu1kr8qe2J1p0IOJpwhO0AgR20T97Pwem/VgbQZnuh7FnUF9n OOGHvwZKSUgKPv+VRxjEY0xhogz3yUAfEZPiJPt3wNRdUqGeryY53FXzV67Q0IV5zxSu FwFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:ui-outboundreport:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=lIZC1op64Y0HWKr0y37x78CYbOYM5ymF7Em2b6gocqQ=; b=JrSgBXgtysa3QYRmQLIeh5lJOTBJq2+9OJD2r4i6qIZwPVJmrQCLCsDoFm9TxxDaBt tkXWIWqausmF1CjV6cLDvpkYD9Ct3Tg/3hzi8SH1Hfh4YcOrAqVLZyq7H8NE4sIgejD+ mouEenm60Jyw4rtheuJlXhq3vopbLX1SIIGY8G4tWr2rGqaQOHHzU9IYOlCa2ClkBgU4 +VxllpnEJlt2tj86GQR8B+kfbLgDBQrimpv7ukzVhzpkqAvb21oRcOEMMUS3XTPcnzsO poJVo8L3/kDoexDT5PmH7n1xysQYN1XFlpWfPo/dsrGBAR9kURguATVNJnmMULy+WZEN 13Pw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmx.de header.s=s31663417 header.b=JcUyi3VK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmx.de Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j8-20020a50ed08000000b00497431159d4si14186119eds.532.2023.02.13.10.29.12; Mon, 13 Feb 2023 10:29:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmx.de header.s=s31663417 header.b=JcUyi3VK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmx.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229941AbjBMSX2 (ORCPT + 99 others); Mon, 13 Feb 2023 13:23:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43270 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231301AbjBMSXP (ORCPT ); Mon, 13 Feb 2023 13:23:15 -0500 Received: from mout.gmx.net (mout.gmx.net [212.227.17.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4013E5596; Mon, 13 Feb 2023 10:22:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.de; s=s31663417; t=1676312549; bh=k12c6zpHprezemc3Q5ubUFsaXlGc2har9SHXA5+paEI=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date; b=JcUyi3VKtz/3ypoVSInsLrLw4V2oyxcWBNyuVdbr5JX49Dmkk3lC8jgADvlLzgh7k pidNUdTcrpjU07JAN0s0dCZP3rtniIAeYrBP8AAp9O5NuFhjiA8uoDpPmquwg5AwS7 p5rgTvCA07GqU+cC9f266jNSyvgc5IcmD1OvZirv40fQHZn38wISrokM4/kYkuB8vN 5CwhOW/WbStPKVQMramegVAhyyPkf9HwNj+234k3R/Lz2UbHlY9xVi5lmL4HKa5cNu A02Eox6RR5bb9pJGM1o+cxE7SCSScQcloepr6Wpu+Z+JVFvFLQBty3YMxFYidqJVWJ KVYVWVVQcnZfQ== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from esprimo-mx.users.agdsn.de ([141.30.226.129]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1M3DJl-1pQnSS0Pdt-003bcv; Mon, 13 Feb 2023 19:22:29 +0100 From: Armin Wolf To: hdegoede@redhat.com, markgross@kernel.org Cc: jdelvare@suse.com, linux@roeck-us.net, platform-driver-x86@vger.kernel.org, linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] platform/x86: dell-ddv: Fix cache invalidation on resume Date: Mon, 13 Feb 2023 19:22:14 +0100 Message-Id: <20230213182215.53703-1-W_Armin@gmx.de> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-Provags-ID: V03:K1:vvmoBXbeMMdQXvxmbFvA+IKtYLvXu8GmIvKNzcZTX2BmVRXgpWV XZRCQoZr7zdQDqh+2ogr+ggJxaqROGv9LyB4npHtP74HBvkf37XUnugGjnpaqFN8FY8PvQC yApJ7PZRjcjzEhljWzWzaD5Fa9mthH7wfD933rQlkPKBhmu5+jy1XITKqQmgukrHGqItPzh n2PCgMSBC2AgHyyIqOq9w== UI-OutboundReport: notjunk:1;M01:P0:QvA1UfwFAJ0=;lVXkmxUufO/mmZwys7/Monjmitq 556Pu+QDay0fKVvqauJHpGRJM1YHN9lekqiMlukE4thBjg1xSi0pcIsrSI5MbH331Gk0tWItT g2rwrq+PMo2rlT/9ebvRt+YTC6AG+HKZC0pRTpc2QkXlZainpqNg/2qZmw9uMJ3JLmIiOkUZ5 60GlgjDhl7t36rcGObC1SwOuAI2zqqB6L4GN+0OJEqxKFl9An1PO2Z5y+s68q2t63tS28wuaG Akp1TedQQISeZtaf2z/SsygVjkamZQFcQs2iTnypSAobL/ZMnJYitzpWUAloqAh6cMhUEuWr+ XVJvffpbq/td9pwT4y56PgxuubvpEDd7Rrkl9z4gKkz7Xu3KY9i5QCKggqk4rwRDSC+iycUBK IItyLjCbporVcrDtNqdiF0/5Gy3vTc6Yg56EIV9VOKCvnYlRouxENDxcG1taPN/F8R9PlKF3H rerxpA2uKuO9KH2xx8VpyF9i1oKlv7sLaQTcucaFZ/Kdt2IISSlqXucfxYSJjjlFz++FxN9hd 7wgHXiquL7ECSez7G9pSoa65cVqJ2+xLN1zvHLKquLCAu/e1MM7LuaFqKORiIB9ulGJ5kCL3f LB6AiMMJBJl2Pulz2ekKK/MrvaeQcMcaatOmuqHtSuaPqnjbf1Fe8rQXlmDTSvOqo1BHYE+ty o1fx+va80uNQeNLjS7M3DmYXBQZsMt8UIGRcw95+DzhktCui5gCqYckQFP+rwivvZ+emdYxxK 7+nt1j7g4Mm3QRv9n/+XFEmNZj0WBugFalyTtMgPHB4108JbuFlCkB4bQ8SKkCm/SnG3OpKRD 1QwT2Q1051SE3FaB5n4LYl4te3YJe8sT665nLmbKMtBZbuFcLu72No8lb/mHPr9d3t2zXDV0F VtM08jNV2nl7O5mhxLImPjpbCnQM8aHr8lwA/5qrGkXF1Mg++A5WjOsbPczXMkaIzE0h0YMGJ 4Hzf6CQq4TJpeOeUIRnkHkNUIrs= X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757741555404642254?= X-GMAIL-MSGID: =?utf-8?q?1757741555404642254?= If one or both sensor buffers could not be initialized, either due to missing hardware support or due to some error during probing, the resume handler will encounter undefined behaviour when attempting to lock buffers then protected by an uninitialized or destroyed mutex. Fix this by introducing a "active" flag which is set during probe, and only invalidate buffers which where flaged as "active". Tested on a Dell Inspiron 3505. Fixes: 3b7eeff93d29 ("platform/x86: dell-ddv: Add hwmon support") Signed-off-by: Armin Wolf --- drivers/platform/x86/dell/dell-wmi-ddv.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) -- 2.30.2 diff --git a/drivers/platform/x86/dell/dell-wmi-ddv.c b/drivers/platform/x86/dell/dell-wmi-ddv.c index d547c9d09725..58f996b3b374 100644 --- a/drivers/platform/x86/dell/dell-wmi-ddv.c +++ b/drivers/platform/x86/dell/dell-wmi-ddv.c @@ -96,6 +96,7 @@ struct combined_chip_info { }; struct dell_wmi_ddv_sensors { + bool active; struct mutex lock; /* protect caching */ unsigned long timestamp; union acpi_object *obj; @@ -530,6 +531,7 @@ static void dell_wmi_ddv_hwmon_cache_destroy(void *data) { struct dell_wmi_ddv_sensors *sensors = data; + sensors->active = false; mutex_destroy(&sensors->lock); kfree(sensors->obj); } @@ -549,6 +551,7 @@ static struct hwmon_channel_info *dell_wmi_ddv_channel_init(struct wmi_device *w return ERR_PTR(ret); mutex_init(&sensors->lock); + sensors->active = true; ret = devm_add_action_or_reset(&wdev->dev, dell_wmi_ddv_hwmon_cache_destroy, sensors); if (ret < 0) @@ -852,9 +855,12 @@ static int dell_wmi_ddv_resume(struct device *dev) { struct dell_wmi_ddv_data *data = dev_get_drvdata(dev); - /* Force re-reading of all sensors */ - dell_wmi_ddv_hwmon_cache_invalidate(&data->fans); - dell_wmi_ddv_hwmon_cache_invalidate(&data->temps); + /* Force re-reading of all active sensors */ + if (data->fans.active) + dell_wmi_ddv_hwmon_cache_invalidate(&data->fans); + + if (data->temps.active) + dell_wmi_ddv_hwmon_cache_invalidate(&data->temps); return 0; } From patchwork Mon Feb 13 18:22:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Armin Wolf X-Patchwork-Id: 56426 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2501783wrn; Mon, 13 Feb 2023 10:28:11 -0800 (PST) X-Google-Smtp-Source: AK7set8y2mzEfHjhST73Sgzo8ham8jaG+pf0e4Fxq9ZIAeRQ4YEODcooQd9H43L2UbMek/mEn+k4 X-Received: by 2002:a17:906:fad2:b0:886:221b:44de with SMTP id lu18-20020a170906fad200b00886221b44demr25572343ejb.0.1676312891590; Mon, 13 Feb 2023 10:28:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676312891; cv=none; d=google.com; s=arc-20160816; b=Ak4JsRzMJ5MNiuzzcN5PH/US5+9xOcHg1p5csjCgUSvTUVKmO3qeBBmrcwdWhygsTw fRJhFEPBQ/niVUx6GYYN9DGslFT1B2Mz+Ua+g6Or0HaYYruz0tms9IhInNjtsgR8sG28 Rcq0VbGM4K3S4WOozRQ+cQu2gcmoWw/zlxcUUi6UATC8snFgP6opTVlM+myyoa7TTNXJ 3N6qYSafnr5ygARto9R17lIpwixfRnt2OVYEV6PdEuv352kPc/WId52ZK+0dX5umlZ9B LAHOkaQH5lzt6LDKNtXgqdk7apB7JIjYdUovr49hIol1ytyRk1OCCiAKD9BznrfYWPoF gkSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:ui-outboundreport:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=NjpCOuncbKcEXpZVFnz/nzyyXEIn16ljVr+mEkCGp1s=; b=nuDr0aWeYlQZIuO3qZ1nojhkbKJUI9YIXnUCCKhtFCPVWpmS3VSOkCA9YXWSlRwkMZ zifA9LuPR+1iD+do4a2mRW+GaCFeFqqiLKT93KyuLaxcpF2Cs/I9KD60+LKPRYlqsPTt UljQ7fi7PqF4Y0cghf8NXpzaWgTVXAae1c0KGk3KJXGyT0odzmTHgLELgRFkaKq7B9W5 9qx0GtUXGbFR0s7BoawH8Q+1rU08uiEcgYV4OtR+IOOavyP3cVcPzCU2cjVqeJwi9Rrr oR9GXQgsZuHWomPg+XTFcdDZaAPA8jikMq7yvP6vrgtgQY5Yjak5WOJaQpwxWdW2hiMQ 0jAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmx.de header.s=s31663417 header.b=eqd1JaUl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmx.de Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id fi3-20020a1709073ac300b0087761d8cff9si13338105ejc.996.2023.02.13.10.27.48; Mon, 13 Feb 2023 10:28:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmx.de header.s=s31663417 header.b=eqd1JaUl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmx.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230007AbjBMSXb (ORCPT + 99 others); Mon, 13 Feb 2023 13:23:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43304 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231320AbjBMSXP (ORCPT ); Mon, 13 Feb 2023 13:23:15 -0500 Received: from mout.gmx.net (mout.gmx.net [212.227.17.22]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1A1E16E98; Mon, 13 Feb 2023 10:22:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.de; s=s31663417; t=1676312551; bh=b5QUutaHQdMw1ITCujaZf3S17KDnmXPSw2Vah3oOv2Y=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=eqd1JaUlXdhpcrMgA0EBygDe1Z7+E1JkSHunCS3BwiT24eQN41iHYfK+TzPI7jgqq zG+keZQtX0R0fWNEiXc6sWQG95GkAII7KY5dbBiPQbsEp7ufuonUGNyH7rM/M70JBi 2TsBzIQHYNvcABCfvUaWN7Uwj3n2/QB0qkfq49bXJK2ML79913wwrsL3m9mXxpDk0D 1NXHCcf8zihNr6WMUcHdtiz9ZueIsPauuNRorJO+3kL7JbVu01VbpZN7h1bXM9eFy6 hoCUbwU4s4N0M3jB4cYn9cWX8eDin1/Qp79Qy3WJA8eZq6DBYc9SuGdw+wEt9URNnI xmdHVfs9eacQw== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from esprimo-mx.users.agdsn.de ([141.30.226.129]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1Mj8mb-1oyKKg1XPB-00f8UO; Mon, 13 Feb 2023 19:22:31 +0100 From: Armin Wolf To: hdegoede@redhat.com, markgross@kernel.org Cc: jdelvare@suse.com, linux@roeck-us.net, platform-driver-x86@vger.kernel.org, linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] platform/x86: dell-ddv: Fix temperature scaling Date: Mon, 13 Feb 2023 19:22:15 +0100 Message-Id: <20230213182215.53703-2-W_Armin@gmx.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230213182215.53703-1-W_Armin@gmx.de> References: <20230213182215.53703-1-W_Armin@gmx.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:NhzqSUt+bn0H9DxRSOha9IUwskz3t/Fblmav0R/35xynQgpPNKK YZ5CguPVi+PLB+IJrzQPX6TLgWgpFDUZOlbVx32PPg/asUYHnTznl2YJhUINUHlqa2178V2 OeCgOinPTstJEn369Xn+3c8Uny8lvWAsOqJ7YDEZcfDvhfsaWKTSQDvtQHXCkr+gmQi4XD5 ABz/1xcB6/TlR003lWKuw== UI-OutboundReport: notjunk:1;M01:P0:6Dm/wEaONZc=;ehZ0GEK4zSNC5ztgt6p1jhQut2k jDWPk1cy7Mcx8DbabPCcBURrMO4NpdCCWyDo189m0RRydqn12O+eVe+eGnpVp7ekSkxHWShwZ fph3W+9Aujmzy6Awf6YtvNkN6QePenF0hDyO9Wg33EhL6jMZgKc2+ke+gf0duz3WjTw4TiMIy T/N1t0zVDJPDFo9+2nO6bQIpDRQH7c6nTpygzHVKX7L1oNLyM/sezD/KnB14wvH/5USnPLLrF FuRwdGhdySGrGVuPYLwkVOso9ant04SCmeQTyvN02jbbhlm4eowzLnWvleVMH705V0ZgjFE0l utDWh2MZRlS372lSeYHvxpbpVyMoqEtHNyxsTZai0+mVt27RtziKk9CF/rZPTzyxmWGZs+O2F 5QyXJvYRlL2ecDJhI3k+Tj7nqfHCHBsnkl0zF9yn4UDUz350zwilyoMsgnXUM3vrBl20uV5Qw e+opENAc7P7ZNoca5wUIjTAcUL3UvEhci9YpuleguhaAeP+Q+lpeLjb/kkbJwb8TA9XOlTShO 3E7mK4hzIXgpjKR8907e6jevq6KdFD1laOZtHu1CpOQAxYj5/TEvwfnXfD03FYqts+m/sfjm0 tD1e+Um1M5E1JMx61kf2Lphto38pxxgnsDucWZF9GMQI5QXJADLw6G+pnxJlbKj088rg0Zrky eEQ6wvWRY3gGNLns5at6cyNrYTcss3HMiX/aLJ7rZAg29I5hJSjFOVaVv3PhT4K/vTmTjcZEX JqG195VG3zAornT0Fl+Wwl4hKzeBzY+WlwhLplXzmwCwpuuAJ5UzS4mgk4zzw3Bhqjup063KM Kw4wY+DnvlxJtpV10H37HxP9nHmx0eLQ/nIhZj7WDVVzD1s3FiQHaJbuuBStQcNkyg2XEDDw9 V69QKTwUsVuIzgFau8rOBd5HnI4O+PYTMNDUcKNs8NELwnKpY3LNSL0myExn9naZ17WKJnoPe lWHUw/RMm/0CKO3Hxa1cbpfRssE= X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757741466545197964?= X-GMAIL-MSGID: =?utf-8?q?1757741466545197964?= After using the built-in UEFI hardware diagnostics to compare the measured battery temperature, i noticed that the temperature is actually expressed in tenth degree kelvin, similar to the SBS-Data standard. For example, a value of 2992 is displayed as 26 degrees celsius. Fix the scaling so that the correct values are being displayed. Tested on a Dell Inspiron 3505. Fixes: a77272c16041 ("platform/x86: dell: Add new dell-wmi-ddv driver") Signed-off-by: Armin Wolf --- drivers/platform/x86/dell/dell-wmi-ddv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.30.2 diff --git a/drivers/platform/x86/dell/dell-wmi-ddv.c b/drivers/platform/x86/dell/dell-wmi-ddv.c index 58f996b3b374..efa860dbff6c 100644 --- a/drivers/platform/x86/dell/dell-wmi-ddv.c +++ b/drivers/platform/x86/dell/dell-wmi-ddv.c @@ -662,7 +662,7 @@ static ssize_t temp_show(struct device *dev, struct device_attribute *attr, char if (ret < 0) return ret; - return sysfs_emit(buf, "%d\n", DIV_ROUND_CLOSEST(value, 10)); + return sysfs_emit(buf, "%d\n", DIV_ROUND_CLOSEST(value * 10 - 27315, 10)); } static ssize_t eppid_show(struct device *dev, struct device_attribute *attr, char *buf)