From patchwork Wed May 4 06:02:37 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduardo Valentin X-Patchwork-Id: 9010331 X-Patchwork-Delegate: rui.zhang@intel.com Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id CE1AABF29F for ; Wed, 4 May 2016 06:05:41 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7BD1220377 for ; Wed, 4 May 2016 06:05:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 937D62027D for ; Wed, 4 May 2016 06:05:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757316AbcEDGDa (ORCPT ); Wed, 4 May 2016 02:03:30 -0400 Received: from mail-pa0-f46.google.com ([209.85.220.46]:33658 "EHLO mail-pa0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757310AbcEDGD3 (ORCPT ); Wed, 4 May 2016 02:03:29 -0400 Received: by mail-pa0-f46.google.com with SMTP id xk12so20288408pac.0; Tue, 03 May 2016 23:03:28 -0700 (PDT) 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=uOcaG+2pMQrnZk8yrT/n0FSpGiCUgLC5Q0rZWEfo73A=; b=FAhmf3wRiTmRi5IgNTqKchg32DDQwYbHRo4IynXEAzsCE7g/4dch0e4ma8+HlQYMuy lbtj9XEl37g6dcP2ywi7sl03pUB3eiMGD0FA9Wwms7FyJm9qI9NEh4AAR8DYOaR0gjVJ OGHYcmHD6vFBwNq3WblA5ZJFGZnkztHDET+irYOrl7Ln6xb8DIx5yXoFn1g36TH6h6SR snuwhB1Iil30k0TCx2M0/S9Z8IzB2kC9Dfnn4+8l/umKxo7J0OKv+eIOfaOtvkHf6LUT JJCefK6BYHgXP6wJ1fXGn+r0qQtttvmJ5erSiPIKSuofz7FQwM6HTiGIU3U3LcTk+6xJ ewxA== 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=uOcaG+2pMQrnZk8yrT/n0FSpGiCUgLC5Q0rZWEfo73A=; b=QQp1xrXc6AAFcPtg6Cv/kNNg7/qCuweAQYCyB+fB5Ydk78AaXisKFpzRf2cUGqVkTp GI3mFF4DFCWeP4ok8DQJmQ+Pr5RbpoDfH2kGO33rGsML/TwGtM0LANyHmLDwk8S+on8p YaX3WGx5X8oG2XBorlZGR9nh5fxSOtlNOB/uLofrU/+v8y5BfFhPIEixUHQByOj96TTr dBhgwH6XmJ8QotkPfAead8ddRHF2ulso2wMxG1g+jr6kZtOotElfHND7fwCPUqQ8iGKe XvXE7hdyJEPXHj7LKINoPceES49plpl92WV49eXIbdlJ6g/rw7/n82fgbQDovoPPRi6i OKOA== X-Gm-Message-State: AOPr4FWPL1ii44EVhi1zMycaB8iwTv8EDnJGVxnmhOrdsldrRPMlv+m8TSQc2D5yedEqaw== X-Received: by 10.66.249.228 with SMTP id yx4mr9586893pac.29.1462341808138; Tue, 03 May 2016 23:03:28 -0700 (PDT) Received: from localhost ([2601:647:4203:c8e0:7256:81ff:febd:926d]) by smtp.gmail.com with ESMTPSA id h1sm2635366pfh.49.2016.05.03.23.03.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 03 May 2016 23:03:27 -0700 (PDT) From: Eduardo Valentin To: Rui Zhang Cc: Linux PM , LKML , Eduardo Valentin Subject: [PATCH 23/31] thermal: core: move __unbind() helper to where it is used Date: Tue, 3 May 2016 23:02:37 -0700 Message-Id: <1462341765-13268-24-git-send-email-edubezval@gmail.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1462341765-13268-1-git-send-email-edubezval@gmail.com> References: <1462341765-13268-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-Spam-Status: No, score=-8.9 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable 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 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 480db91..e1515f3 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; @@ -1012,6 +1002,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.