From patchwork Tue Dec 15 01:19:53 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kuninori Morimoto X-Patchwork-Id: 7850481 X-Patchwork-Delegate: eduardo.valentin@ti.com Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id CDF049F1C2 for ; Tue, 15 Dec 2015 01:20:02 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id F2A1A20357 for ; Tue, 15 Dec 2015 01:20:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0EA6B202C8 for ; Tue, 15 Dec 2015 01:20:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932859AbbLOBUA (ORCPT ); Mon, 14 Dec 2015 20:20:00 -0500 Received: from relmlor2.renesas.com ([210.160.252.172]:63923 "EHLO relmlie1.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932824AbbLOBT6 (ORCPT ); Mon, 14 Dec 2015 20:19:58 -0500 Received: from unknown (HELO relmlir3.idc.renesas.com) ([10.200.68.153]) by relmlie1.idc.renesas.com with ESMTP; 15 Dec 2015 10:19:56 +0900 Received: from relmlac2.idc.renesas.com (relmlac2.idc.renesas.com [10.200.69.22]) by relmlir3.idc.renesas.com (Postfix) with ESMTP id 5BED7467F4; Tue, 15 Dec 2015 10:19:56 +0900 (JST) Received: by relmlac2.idc.renesas.com (Postfix, from userid 0) id 4955D2806E; Tue, 15 Dec 2015 10:19:56 +0900 (JST) Received: from relmlac2.idc.renesas.com (localhost [127.0.0.1]) by relmlac2.idc.renesas.com (Postfix) with ESMTP id 4571B2806D; Tue, 15 Dec 2015 10:19:56 +0900 (JST) Received: from relmlii2.idc.renesas.com [10.200.68.66] by relmlac2.idc.renesas.com with ESMTP id LAF28921; Tue, 15 Dec 2015 10:19:56 +0900 X-IronPort-AV: E=Sophos;i="5.20,429,1444662000"; d="scan'";a="201809544" Received: from mail-pu1apc01lp0021.outbound.protection.outlook.com (HELO APC01-PU1-obe.outbound.protection.outlook.com) ([65.55.88.21]) by relmlii2.idc.renesas.com with ESMTP/TLS/AES256-SHA; 15 Dec 2015 10:19:55 +0900 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=kuninori.morimoto.gx@renesas.com; Received: from morimoto-PC.renesas.com (211.11.155.144) by HK2PR06MB1010.apcprd06.prod.outlook.com (10.161.187.27) with Microsoft SMTP Server (TLS) id 15.1.355.16; Tue, 15 Dec 2015 01:19:53 +0000 Message-ID: <871taoqzn3.wl%kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto Subject: [PATCH 8/8 v5] thermal: trip_point_temp_store() calls thermal_zone_device_update() User-Agent: Wanderlust/2.15.9 Emacs/24.3 Mule/6.0 MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") To: Simon , Zhang Rui , Eduardo Valentin CC: Geert Uytterhoeven , Magnus , , , , "devicetree@vger.kernel.org" In-Reply-To: <87d1u8qzsy.wl%kuninori.morimoto.gx@renesas.com> References: <87d1u8qzsy.wl%kuninori.morimoto.gx@renesas.com> Date: Tue, 15 Dec 2015 01:19:53 +0000 X-Originating-IP: [211.11.155.144] X-ClientProxiedBy: OS1PR01CA0001.jpnprd01.prod.outlook.com (25.161.225.139) To HK2PR06MB1010.apcprd06.prod.outlook.com (25.161.187.27) X-Microsoft-Exchange-Diagnostics: 1; HK2PR06MB1010; 2:HfMCCIYHf9WCukg1Aj7af8tO6OfPry5JNZJBUmywHVkRFqUd0TeRJHWWZIDLFU2rlRKuGxgQaQeb5iMRBelQJ5f+HAJxJZxeLMxgOEXnkoivHaKYi4TVRQ+IPliorolkBiGGKZmw0qP/KDh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yAgMvtokLpaHrNdox/oc28F4oqJ9v3YOOlPMfViQ/W4uDdHO2IQwMrd9KJ0dCM3TZGqvns83J7j6urQTMoPrToj8pApcNL/qQ1xBGyWihgOQN5XPEzImoPaJkL7YP330TnKDjG18rFXcM5OzADGSAucWUGGPC07+qFkSLiVaRaKrFu044/SjvSDcVLqJwcyDXyAIyAZUPQ7VySS5i1q5ygCX0riEDXl26xEjCcu9s6Nf4b+avcxVqRMhRhjt0zlFDP6VveohZTQni89qI8oQEBzELEoJCeT47Egxy4/RIfV6HX+uHXvpWSrRc+Tox7MRCRU9/F3MGfe3cxJAqAFmc6KWmulvjtRzzcXmLIH2/3W88BdIB514DbvVUWsmcIu VpDvGzesWrullqH+OvsvmbWajc X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(85106069007906); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(8121501046)(520078)(5005006)(3002001)(10201501046); SRVR:HK2PR06MB1010; BCL:0; PCL:0; RULEID:; SRVR:HK2PR06MB1010; X-Forefront-PRVS: 07915F544A X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(6009001)(189002)(199003)(54356999)(5001960100002)(46406003)(23726003)(1096002)(50466002)(87976001)(92566002)(586003)(86362001)(2950100001)(33646002)(101416001)(77096005)(5008740100001)(229853001)(50986999)(189998001)(106356001)(3846002)(36756003)(81156007)(40100003)(83506001)(42186005)(76176999)(19580405001)(6116002)(66066001)(69596002)(47776003)(105586002)(53416004)(97736004)(19580395003)(5001770100001)(5004730100002)(4001350100001)(122386002); DIR:OUT; SFP:1102; SCL:1; SRVR:HK2PR06MB1010; H:morimoto-PC.renesas.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; HK2PR06MB1010; 23:cfMdnfVTfRBIynte3Sfn0YlXWzidGZ9vdCZMvk+5l?= =?us-ascii?Q?Qg4PUSRS2C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Q?= =?us-ascii?Q?NynOrcLscAKiuMMR4vOhEA6exDZ5gYXDp+mttH7I908gi7DW4ciwSFOuGxJe?= =?us-ascii?Q?mAJ38zQS4OacclvYWIkrm+zcTfOcZdXJTHiYRdxgdXH+rHlAva3+GALIbgkg?= =?us-ascii?Q?UhfOfO7C3O0ie2yGboiJig6GsDylSXsfGdGKMLpWcx+G6GW0hjCEpclcFZF3?= =?us-ascii?Q?usq4ejqO7g=3D?= X-Microsoft-Exchange-Diagnostics: 1; HK2PR06MB1010; 5:BHUBCDSVdseF2vpWCSoDZF9E4PBrYQf8Zdn8z3Q64uaYp9a5+C4EUwt7IkZB0Oec5tDkR1Bcmd3Z3dgufx6ghxez6+EX7AvUuhPxXgw3AWs/yjQlTchTTM/HznEdjbyCcMpWLtkyeuC36P1kdeIG0Q==; 24:SZ11AN0KtU/YI6EqoFj+iYHt5D++SbHm7FsTespJ8F8ndlkkUjmFKQAG6f/yNSbBKtUGto5UNmGXr9GkYZwDYrIQp1KCJZ7qJB3ZvslCsQ4=; 20:0hhq24zGyn7w6MRNGG/n6t03PLmejKuAPVHKoLhBN2nsmiQ7wHRNkCS+qQ2tC+XCig5boDSTtVa4I/VzN5vgqACVJQBp3sciB+cyCTzOeruyd1IZ/Dd+v/x0YjT3PyblwhUWOvbkNt2AO666sbQMoYdvp2l+u7InMt3gnzJo8Z8= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Dec 2015 01:19:53.3783 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: HK2PR06MB1010 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Kuninori Morimoto trip_point_temp_store() updates trip temperature. It should call thermal_zone_device_update() immediately. Signed-off-by: Kuninori Morimoto --- v4 -> v5 - implemented on thermal_core.c drivers/thermal/thermal_core.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c index d9e525c..768fb10 100644 --- a/drivers/thermal/thermal_core.c +++ b/drivers/thermal/thermal_core.c @@ -676,8 +676,12 @@ trip_point_temp_store(struct device *dev, struct device_attribute *attr, return -EINVAL; ret = tz->ops->set_trip_temp(tz, trip, temperature); + if (ret) + return ret; - return ret ? ret : count; + thermal_zone_device_update(tz); + + return count; } static ssize_t