Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp6873971ybc; Thu, 28 Nov 2019 06:59:36 -0800 (PST) X-Google-Smtp-Source: APXvYqwCQypLfXQMu3gINqwT6Wfcz5nooyQgao63M6OenS0SLLGZVkok4TTVimkEgdSvT6QYYa0X X-Received: by 2002:a50:f612:: with SMTP id c18mr39484326edn.285.1574953176873; Thu, 28 Nov 2019 06:59:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574953176; cv=none; d=google.com; s=arc-20160816; b=lqJ/rOlGcMsBf0qiWFvV6onhHVnSRqaq3hTHRBryEy0GvPo/alsKEGKb1Ad3z9fZkg XGdtfsvZrwzbXyYzq2gl8YAbcnskwoX87seIJbvbCC/GDCl7I+Y+5vl9cKK2ryf/3R00 8fd+L2LWOsWcc6xA8Y367h024SMcbOiaIwsp3IDpM4Yz5zq3xWo/55Nvtlh9z9pnKiWw +sRqRaEPwuxAcayDh+iF3o6Mi0GaGd1TB75v0TXU1LVebzjS09EP+mPbcpv+Zilptw6b 5U/sT6i74rOXKsn4LT5jMmvgYZ9iWXBdR7c3u5nQqQUavI00CFMTnCrybc0P20mPHgRz GtYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=Rl/Muaad0JKZvHEYUN/4/vVrZyhpWqkrNfXezrDAyeU=; b=057M3ujEBsk9ss3jYp8XtGZba4MVEtzHJFC6ehOVrbl7bJDN25Lh7m1D+UDX/14o07 H+j62w88VIfBwM+RkSPREW5mXHEcfZ4WGLZRLYS9Hm3DrixwTLRdXuoGs78gzCkPsYZu y6X1zvNds7Ehj95NKy+DUpxehuzuoeIvZjI5+rkKubqFIfOoy997y7+Lca2e8wkv8uBp zeQh7BYTBk0O5hd4hSikhAQ0kQ1FmO2/V6AUlsaoxX4VW0l3gmGwyGI/FK/8UccUkhcY XToEtfpA+xoMIp79PVKN6OLaD4FzfwxB6roD9MTOnA1fl1MpbdW9x4sxSZO1JTXNA7ru tHtg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=VNGiuixp; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d9si12030054ejw.65.2019.11.28.06.59.12; Thu, 28 Nov 2019 06:59:36 -0800 (PST) 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=@gmail.com header.s=20161025 header.b=VNGiuixp; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727110AbfK1OzU (ORCPT + 99 others); Thu, 28 Nov 2019 09:55:20 -0500 Received: from mail-pl1-f194.google.com ([209.85.214.194]:34421 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726558AbfK1OzT (ORCPT ); Thu, 28 Nov 2019 09:55:19 -0500 Received: by mail-pl1-f194.google.com with SMTP id h13so11722208plr.1; Thu, 28 Nov 2019 06:55:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Rl/Muaad0JKZvHEYUN/4/vVrZyhpWqkrNfXezrDAyeU=; b=VNGiuixpHdhZlKCdI1lUbF3zqtjKhA8JjC+y8CfCWFSPFQ0BQz3Lmb0QLJTeQzeeOp I3MeGV7hUuAKdiWZjr9nz5YeeVEaBxxsWo7QfzwE5sJCF8N4jcodOUIv88gm2xsi9+R7 +BQRtKJq5MV1L8ufJnXe56xOngFxMRJyrlT/Nc8R94EMwK7GJn8AooBCxywnqUUpcvPZ yksVDGyhleVo0RnEBJS31FGBfySon8G+y0S1+6NAYU4EZpHqlqBPdZ3qbFskqmJ4z874 pzMm7HaYHErXanglixeEhcaG4g6dNNTXqgAj/Pc2fw8A1uCma13Pr826ept1srbPcqFL 74TQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Rl/Muaad0JKZvHEYUN/4/vVrZyhpWqkrNfXezrDAyeU=; b=R2rruXsmDqp4XijQIlyW2B3ma/CyU1F96wp/A3VmJsxA4YPiWNhaOT1GSPWClbj3PW YHNy3krA1DfDNyavtd47/cQhfFtyNnNbrit2MKaAdJoiJiA2wMHIBbS28zrbnwx/NtPg KwVQjX6I/o7x+3HTsa1o3Vil0JvIOmGLaIJCbEHqmo2hLZKnj2idPvJT0pVRVvSp/0sR cR7AqnRNKz/NKNyuO/pVHbyKyXXh9mzOU6WkuVnhpqeDqtYepVE/gty9tbEi8ZmyX1lc wFLqPz25JQkXz+ZSD9ri109dp3VVa9ltSO1IEqnoxY5vIlAyBaAY/AcO68I5orGCROdf PNzA== X-Gm-Message-State: APjAAAUfyyaORh4MiTeb2bkTFKRIy23GdKPswXhwykgqf+H2A7s4Q6ul 2B0iGozseDT1gZPGO41TNplLdbQUQbA= X-Received: by 2002:a17:90a:48:: with SMTP id 8mr12600637pjb.82.1574952918403; Thu, 28 Nov 2019 06:55:18 -0800 (PST) Received: from localhost.localdomain ([240f:34:212d:1:8015:e854:5ef0:f52e]) by smtp.gmail.com with ESMTPSA id z11sm22282563pfg.117.2019.11.28.06.55.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 28 Nov 2019 06:55:17 -0800 (PST) From: Akinobu Mita To: linux-nvme@lists.infradead.org, linux-hwmon@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Akinobu Mita , Sujith Thomas , Darren Hart , Andy Shevchenko , Zhang Rui , Daniel Lezcano , Amit Kucheria , Jean Delvare , Guenter Roeck , Keith Busch , Jens Axboe , Christoph Hellwig , Sagi Grimberg Subject: [PATCH v2 5/8] thermal: int340x: switch to use helpers Date: Thu, 28 Nov 2019 23:54:36 +0900 Message-Id: <1574952879-7200-6-git-send-email-akinobu.mita@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1574952879-7200-1-git-send-email-akinobu.mita@gmail.com> References: <1574952879-7200-1-git-send-email-akinobu.mita@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This switches the int340x thermal zone driver to use deci_kelvin_to_millicelsius() and millicelsius_to_deci_kelvin() in instead of helpers in . This is preparation for centralizing the kelvin to/from Celsius conversion helpers in . Cc: Sujith Thomas Cc: Darren Hart Cc: Andy Shevchenko Cc: Zhang Rui Cc: Daniel Lezcano Cc: Amit Kucheria Cc: Jean Delvare Cc: Guenter Roeck Cc: Keith Busch Cc: Jens Axboe Cc: Christoph Hellwig Cc: Sagi Grimberg Signed-off-by: Akinobu Mita --- * v2 - include explicitly from thermal drivers - fix s/temprature/temperature/ typo in commit log drivers/thermal/intel/int340x_thermal/int340x_thermal_zone.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/thermal/intel/int340x_thermal/int340x_thermal_zone.c b/drivers/thermal/intel/int340x_thermal/int340x_thermal_zone.c index 75484d6..6658cc7 100644 --- a/drivers/thermal/intel/int340x_thermal/int340x_thermal_zone.c +++ b/drivers/thermal/intel/int340x_thermal/int340x_thermal_zone.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include "int340x_thermal_zone.h" @@ -34,7 +35,7 @@ static int int340x_thermal_get_zone_temp(struct thermal_zone_device *zone, *temp = (unsigned long)conv_temp * 10; } else /* _TMP returns the temperature in tenths of degrees Kelvin */ - *temp = DECI_KELVIN_TO_MILLICELSIUS(tmp); + *temp = deci_kelvin_to_millicelsius(tmp); return 0; } @@ -116,7 +117,7 @@ static int int340x_thermal_set_trip_temp(struct thermal_zone_device *zone, snprintf(name, sizeof(name), "PAT%d", trip); status = acpi_execute_simple_method(d->adev->handle, name, - MILLICELSIUS_TO_DECI_KELVIN(temp)); + millicelsius_to_deci_kelvin(temp)); if (ACPI_FAILURE(status)) return -EIO; @@ -163,7 +164,7 @@ static int int340x_thermal_get_trip_config(acpi_handle handle, char *name, if (ACPI_FAILURE(status)) return -EIO; - *temp = DECI_KELVIN_TO_MILLICELSIUS(r); + *temp = deci_kelvin_to_millicelsius(r); return 0; } -- 2.7.4