From patchwork Tue Nov 8 05:09:14 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduardo Valentin X-Patchwork-Id: 9416513 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.web.codeaurora.org (Postfix) with ESMTP id 9C2B760512 for ; Tue, 8 Nov 2016 05:12:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8D64428B99 for ; Tue, 8 Nov 2016 05:12:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 81DAF28B9B; Tue, 8 Nov 2016 05:12:56 +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=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID 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 214BB28B99 for ; Tue, 8 Nov 2016 05:12:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932090AbcKHFMy (ORCPT ); Tue, 8 Nov 2016 00:12:54 -0500 Received: from mail-pf0-f193.google.com ([209.85.192.193]:35415 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932458AbcKHFK5 (ORCPT ); Tue, 8 Nov 2016 00:10:57 -0500 Received: by mail-pf0-f193.google.com with SMTP id i88so18053785pfk.2; Mon, 07 Nov 2016 21:10:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Dcm5skdI0oKS/blKntRbTooyW6bEllP3QsYGjaXwXjM=; b=MVXmlwaiTG2IFlY131g/iUBwwZGRx3saf0jmN30niUkmY/RAsmdbWyZnTsdBe8VMpk mx4WzIjaLyqtYKBq7ABZiiSXH9jcbBP+whN50GaAl3g5Sny0HK9zz/4vnFkhlNgxmxyA 7G/1wBZeuoOg0WeQ1e3KGEbesJkrloJ7BVSNw3eTdnwiC/kYAcsPoLVMVrep1eTIeDPd TlbjKXrrcHJtPJkuKus3I08XKCbJ2zywHp6nFL9BrSaNd73rkACMOrGMPY+wcJGOl23d MO2NS0q7ew7UJ1xjYV38H00Ks14Z1LGBspXYO0bAd7i0in8SqVjc5IP/1MgqxcloWebi AEvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Dcm5skdI0oKS/blKntRbTooyW6bEllP3QsYGjaXwXjM=; b=F6uisPYTTtBwuA5qh63XfW5zwKkE028l4T5dwGQ7om+JliTUgQajHfIc52LjCDDpVk PQ3oXvYywCtsa4IGv2XnEoFj+rY3ngN4FhwoFpNjBurhjFBo9OZoZ/WKb/Z/1P9exY61 BXVQjt0l/I2qiuB36nQtSthul1xGAwa/KNBBWWfUbSTy9DRln3X2Zm2+nEsW7zPCllBU gFzCjCGHBdUnDzrj7ggyUKvF/W835JIyINdfaEVd+i6TFdnJ0N7sLaTkXCdaepRMmouM wKwG3fZ8InjxQUo/c2QWVQUsu6T3RscmhYMfBq+1CZ3B7vnBxu9UcWNuu5qLSbMzKIa3 aLhw== X-Gm-Message-State: ABUngvcltLaZGQDs+kjZiHFM646AIQozhlrfmUtq25vYFET82wuM1DZtu9c2NjcjOx2s8w== X-Received: by 10.98.84.135 with SMTP id i129mr19931506pfb.93.1478581856654; Mon, 07 Nov 2016 21:10:56 -0800 (PST) Received: from localhost ([2601:647:4401:a2f0:7256:81ff:febd:926d]) by smtp.gmail.com with ESMTPSA id 65sm13869707pfn.12.2016.11.07.21.10.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 07 Nov 2016 21:10:56 -0800 (PST) From: Eduardo Valentin To: Rui Zhang Cc: LKML , Linux PM , Eduardo Valentin Subject: [PATCHv2 36/49] thermal: core: move notify to the zone update section Date: Mon, 7 Nov 2016 21:09:14 -0800 Message-Id: <1478581767-7009-37-git-send-email-edubezval@gmail.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1478581767-7009-1-git-send-email-edubezval@gmail.com> References: <1478581767-7009-1-git-send-email-edubezval@gmail.com> 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 moving the helper function to closer to similar functions. Cc: Zhang Rui Cc: linux-pm@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin --- drivers/thermal/thermal_core.c | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c index bc9a422..884235f 100644 --- a/drivers/thermal/thermal_core.c +++ b/drivers/thermal/thermal_core.c @@ -424,6 +424,24 @@ void thermal_zone_device_update(struct thermal_zone_device *tz, } EXPORT_SYMBOL_GPL(thermal_zone_device_update); +/** + * thermal_notify_framework - Sensor drivers use this API to notify framework + * @tz: thermal zone device + * @trip: indicates which trip point has been crossed + * + * This function handles the trip events from sensor drivers. It starts + * throttling the cooling devices according to the policy configured. + * For CRITICAL and HOT trip points, this notifies the respective drivers, + * and does actual throttling for other trip points i.e ACTIVE and PASSIVE. + * The throttling policy is based on the configured platform data; if no + * platform data is provided, this uses the step_wise throttling policy. + */ +void thermal_notify_framework(struct thermal_zone_device *tz, int trip) +{ + handle_thermal_trip(tz, trip); +} +EXPORT_SYMBOL_GPL(thermal_notify_framework); + static void thermal_zone_device_check(struct work_struct *work) { struct thermal_zone_device *tz = container_of(work, struct @@ -1037,24 +1055,6 @@ void thermal_cooling_device_unregister(struct thermal_cooling_device *cdev) } EXPORT_SYMBOL_GPL(thermal_cooling_device_unregister); -/** - * thermal_notify_framework - Sensor drivers use this API to notify framework - * @tz: thermal zone device - * @trip: indicates which trip point has been crossed - * - * This function handles the trip events from sensor drivers. It starts - * throttling the cooling devices according to the policy configured. - * For CRITICAL and HOT trip points, this notifies the respective drivers, - * and does actual throttling for other trip points i.e ACTIVE and PASSIVE. - * The throttling policy is based on the configured platform data; if no - * platform data is provided, this uses the step_wise throttling policy. - */ -void thermal_notify_framework(struct thermal_zone_device *tz, int trip) -{ - handle_thermal_trip(tz, trip); -} -EXPORT_SYMBOL_GPL(thermal_notify_framework); - static void bind_tz(struct thermal_zone_device *tz) { int i, ret;