From patchwork Tue Nov 8 05:09:08 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduardo Valentin X-Patchwork-Id: 9416521 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 A88B560512 for ; Tue, 8 Nov 2016 05:13:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 97E8D28B99 for ; Tue, 8 Nov 2016 05:13:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 88F8B28B9B; Tue, 8 Nov 2016 05:13:41 +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 3957728B99 for ; Tue, 8 Nov 2016 05:13:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932458AbcKHFN0 (ORCPT ); Tue, 8 Nov 2016 00:13:26 -0500 Received: from mail-pf0-f193.google.com ([209.85.192.193]:35934 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932197AbcKHFKs (ORCPT ); Tue, 8 Nov 2016 00:10:48 -0500 Received: by mail-pf0-f193.google.com with SMTP id n85so18051762pfi.3; Mon, 07 Nov 2016 21:10:48 -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=4qka82Yttos40UmZzASWym5hBjrzqc84cB13d3O/UPc=; b=pfJ5dpeRKOeOAMBPOcDANuiU9OX7NINmwQIK8+S16mu98ZgB0HXD4hHDTWJ284jxSz QWJBXcIXqukdjWq68qfh/ObFXtQBlXFJvTatWVOTk0QrC8DPZN+53CRufY0+QbLNKssk HYzK2L1BEwfmo6k+iwEUjSomwp942FqIbsSRidj10zV2kA+ctlQh+7F1GpQ3400sx+qO Z7iqyvvbjXj3qQZF/emqURVCmh3dfrbbXSxtFdbTSE2uch8InsfDxxSGCyiyv20vEg4E QumnJ+ir8Lr5Lzc8/odb49KdmSF4NbNuY8VCz3CaImUe9cSignu350FNG0zq1Dkf60Nb yb2w== 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=4qka82Yttos40UmZzASWym5hBjrzqc84cB13d3O/UPc=; b=MBU76YC6fvJqmXYuE6CD4J9rVfrAeJRmfkSi0AS9i6MN8vIGWFS/w1UeFlzW43GSBa U5EFCZlt8vlXlKwlVdn2WYsFlmW5GknyYaDqn6t+CS6ZkRejQcTTVQOw09zdCMvvttmC Pa72IfTfiu4NhS4/fRo5gMBAbFOnS0NyN+3SmRyD4+p4MkV3h6LKCmdSWKKbxacBlq6P 7NyzC0tJIKBm93NXb1L/0TteAPalJjg+AS5eWp4Edv3aTFydxpfoFDQrTDAl2CVuJbuI TrHBbCk643YyqoLe1mzeQwgxnVx0DQtg7uRocGWL33KzzdD0RQRDOBr7Wng0f80YGtLi zSeg== X-Gm-Message-State: ABUngvekHN3wTpCop4NF3JpIhGr1HqB0O3Lj2ibyUBEUTlOneYw+rAVfpau8qeF4Lh9d6w== X-Received: by 10.98.36.195 with SMTP id k64mr20046039pfk.126.1478581847671; Mon, 07 Nov 2016 21:10:47 -0800 (PST) Received: from localhost ([2601:647:4401:a2f0:7256:81ff:febd:926d]) by smtp.gmail.com with ESMTPSA id z3sm44505438paw.48.2016.11.07.21.10.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 07 Nov 2016 21:10:46 -0800 (PST) From: Eduardo Valentin To: Rui Zhang Cc: LKML , Linux PM , Eduardo Valentin Subject: [PATCHv2 30/49] thermal: core: move __unbind() helper to where it is used Date: Mon, 7 Nov 2016 21:09:08 -0800 Message-Id: <1478581767-7009-31-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 Simply moving the helper to closer where it is actually used. 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 | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c index c31d0bb..c121933 100644 --- a/drivers/thermal/thermal_core.c +++ b/drivers/thermal/thermal_core.c @@ -319,16 +319,6 @@ static void __bind(struct thermal_zone_device *tz, int mask, } } -static void __unbind(struct thermal_zone_device *tz, int mask, - struct thermal_cooling_device *cdev) -{ - int i; - - for (i = 0; i < tz->trips; i++) - if (mask & (1 << i)) - thermal_zone_unbind_cooling_device(tz, i, cdev); -} - static void bind_cdev(struct thermal_cooling_device *cdev) { int i, ret; @@ -1021,6 +1011,16 @@ thermal_of_cooling_device_register(struct device_node *np, } EXPORT_SYMBOL_GPL(thermal_of_cooling_device_register); +static void __unbind(struct thermal_zone_device *tz, int mask, + struct thermal_cooling_device *cdev) +{ + int i; + + for (i = 0; i < tz->trips; i++) + if (mask & (1 << i)) + thermal_zone_unbind_cooling_device(tz, i, cdev); +} + /** * thermal_cooling_device_unregister - removes the registered thermal cooling device * @cdev: the thermal cooling device to remove.