From patchwork Sun Nov 4 17:33:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Zhang, Rui" X-Patchwork-Id: 10666965 X-Patchwork-Delegate: rui.zhang@intel.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A5A3715E9 for ; Sun, 4 Nov 2018 17:33:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 83E87288D8 for ; Sun, 4 Nov 2018 17:33:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5DC04288BD; Sun, 4 Nov 2018 17:33:38 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B9D04288BD for ; Sun, 4 Nov 2018 17:33:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731064AbeKECtU (ORCPT ); Sun, 4 Nov 2018 21:49:20 -0500 Received: from mga18.intel.com ([134.134.136.126]:33539 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729332AbeKECtU (ORCPT ); Sun, 4 Nov 2018 21:49:20 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 04 Nov 2018 09:33:34 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,464,1534834800"; d="scan'208";a="88505169" Received: from dgao1-mobl1.ccr.corp.intel.com (HELO rzhang-dell-9360.ccr.corp.intel.com) ([10.255.30.243]) by orsmga006.jf.intel.com with ESMTP; 04 Nov 2018 09:33:32 -0800 From: Zhang Rui To: linux-pm@vger.kernel.org Cc: b.zolnierkie@samsung.com, amit.kucheria@linaro.org, edubezval@gmail.com, srinivas.pandruvada@linux.intel.com, rui.zhang@intel.com Subject: [RTC PATCH 1/2] thermal: remove redundant polling timer update Date: Mon, 5 Nov 2018 01:33:29 +0800 Message-Id: <1541352810-21164-1-git-send-email-rui.zhang@intel.com> X-Mailer: git-send-email 2.7.4 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP polling timer only needs to be updated once after all the trip points have been updated. Thus remove the redundant call of monitor_thermal_zone(). Signed-off-by: Zhang Rui --- drivers/thermal/thermal_core.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c index d6ebc1c..98f02b0 100644 --- a/drivers/thermal/thermal_core.c +++ b/drivers/thermal/thermal_core.c @@ -419,11 +419,6 @@ static void handle_thermal_trip(struct thermal_zone_device *tz, int trip) handle_critical_trips(tz, trip, type); else handle_non_critical_trips(tz, trip, type); - /* - * Alright, we handled this trip successfully. - * So, start monitoring again. - */ - monitor_thermal_zone(tz); } static void update_temperature(struct thermal_zone_device *tz) @@ -482,6 +477,7 @@ void thermal_zone_device_update(struct thermal_zone_device *tz, for (count = 0; count < tz->trips; count++) handle_thermal_trip(tz, count); + monitor_thermal_zone(tz); } EXPORT_SYMBOL_GPL(thermal_zone_device_update);