Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1906760ybb; Thu, 2 Apr 2020 09:28:15 -0700 (PDT) X-Google-Smtp-Source: APiQypKMWpbOSXiRfu4c3jfZVtTweWTWN5XDZjb5bUNJPTeakUBY51e4D8jHmMf9ja/PVg1TCbgk X-Received: by 2002:aca:5041:: with SMTP id e62mr2791424oib.146.1585844895229; Thu, 02 Apr 2020 09:28:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585844895; cv=none; d=google.com; s=arc-20160816; b=t6iliGgps0rHxd7yJn5EVNu++n74PARRDPH51DhziRnIXP4zguxE4vtMhVUa82a3l5 +thEP/hFYEN75EW1K9gbbxjoe0m4Op9wjq2HUT2Y0jRSy8t/R1DVmL5WNIPGMcP+nbEK CdriaXZjIIBDRs9id7qtEscI4XcNEF/jrupmhwfsdHIZxsUkstX8Z/WT5uMOMhs0K6jQ wUWXfB5bR27M2oXO5ZQuCymwR9TFw4ewG72yUwKpkb9JO/5AXmZaB35coe5qm88ODhpn +nfIWP+1sBS68hvL1JiuC0BYBToxBbn8i5LE6QffQeEDjglyLxj1dDV+2LTSnv5zw6qf 3dCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=uPGWZu5ngtNrn+ryPQoiCELQ8McZSJI9oUiugafXI6g=; b=LaDfZYc8SSrX3+C7fnBGEq7Tj9w/mqQxjGAVs+CHu2cLYIK0M3axqz1x0kKkXEJwPd NhszcuD9RVlw/zPQP8DW+L6qRBGPoOpVGrb9ZMyUjx0zLDROc4wBva/5wl0m1UmBLY1z vUGLO2MT2nilmQCssERj4x2ixUQbxcoOVyastM+S6oQy3+1N1qpVByVPVmsfppThpoJg gse8QKucKWDb6hFLnu+SWhQ5mL5NMSc3Gb/iMnERfJ5EmUjL50gZm07Df2H59Ry3pLUy 6ZB1qpZejP4gDA6wTwzA1wSUY6vUec1kVT0pQZj4xeWCfb01Gt3m1/4/aFYRMUJ1VUyP T0Zw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="o/I/qpgo"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c29si2489841oos.39.2020.04.02.09.28.02; Thu, 02 Apr 2020 09:28:15 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="o/I/qpgo"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388136AbgDBO2M (ORCPT + 99 others); Thu, 2 Apr 2020 10:28:12 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:33556 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387891AbgDBO2K (ORCPT ); Thu, 2 Apr 2020 10:28:10 -0400 Received: by mail-wr1-f65.google.com with SMTP id a25so4511590wrd.0 for ; Thu, 02 Apr 2020 07:28:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=uPGWZu5ngtNrn+ryPQoiCELQ8McZSJI9oUiugafXI6g=; b=o/I/qpgoI9N99qSUGVAT2YPVoswXsiEWtTfuGeSlJdhScbZ3X4vD5MITtdD2ivhgJ5 OCri0l9wcpQJH5ocUtjZ5Mdbw8P+zrmnJ2jW9g47zE9Un0xoBZbELZfmQM3pUbwoW5Hk QYfoDeM2UKlcIgfTIhbwdfRhtGh+0wATUYmx0tjnHiLebUpMjYl8cySoCI7nr94JlyFr 4qc4WRUkQGnplFloQnD+CMGlosHCl4eJxz4S3mheJqioDBkstd4mN8zOo5DePghB9u3N oI9BffCtmo2mmHgwxB79zp1kyEccpVKI5YqsTsn3KMjxsXqLzIjAFftiRQnIMsnC7HIk SerQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=uPGWZu5ngtNrn+ryPQoiCELQ8McZSJI9oUiugafXI6g=; b=O0DyjyEifh7QK1YMZx2FpZqht3QFSCnddW0u/t5uhwZcUL15PdL97/XcDa4uaDCVZ4 mwZLphNBYZdhdKstTMtbAXb2IB4bJt3yJ4IAmLY1KF/1bo1oFXi00OPPz/Rfxdp2QNz3 gTghi1rfqTA08E2Zv/Cw0BRagHk4ASsQa8K9lKcdAJp7Rk6OrSa+cuFfLtDCAAMhGV9m oOdIiUqy3ESfAzOoyknx2OxQweta2yLUbm7JuhtxiPdQAXapPysGLzf5qEQIkXpyRqLj LXcZrO46rdNJpGgpnnrcytEoye3Rz0AibtJPuvlqQ00ogHdgjowctaq9juu3IR3dDEw0 uKZQ== X-Gm-Message-State: AGi0PubyNFrVb8H8F3IGaHH273cSbPdGaeUSEOqS0ki5EHHJUGQmDoBO 9d++7cFn6tzT1bIgWtyjUKK53A== X-Received: by 2002:a05:6000:1251:: with SMTP id j17mr3845212wrx.228.1585837688069; Thu, 02 Apr 2020 07:28:08 -0700 (PDT) Received: from mai.imgcgcw.net ([2a01:e34:ed2f:f020:4b2:e366:e86f:261a]) by smtp.gmail.com with ESMTPSA id a7sm7045186wmm.34.2020.04.02.07.28.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Apr 2020 07:28:07 -0700 (PDT) From: Daniel Lezcano To: daniel.lezcano@linaro.org, rui.zhang@intel.com Cc: amit.kucheria@verdurent.com, linux-pm@vger.kernel.org (open list:THERMAL), linux-kernel@vger.kernel.org (open list) Subject: [PATCH V2 6/9] thermal: Move get_thermal_instance to the internal header Date: Thu, 2 Apr 2020 16:27:44 +0200 Message-Id: <20200402142747.8307-6-daniel.lezcano@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200402142747.8307-1-daniel.lezcano@linaro.org> References: <20200402142747.8307-1-daniel.lezcano@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The function is not used any place other than the thermal directory. It does not make sense to export its definition in the global header as there is no use of it. Move the definition to the internal header and allow better self-encapsulation. Take the opportunity to add the parameter names to make checkpatch happy and remove the pointless stubs. Signed-off-by: Daniel Lezcano --- drivers/thermal/thermal_core.h | 5 +++++ include/linux/thermal.h | 6 ------ 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/thermal/thermal_core.h b/drivers/thermal/thermal_core.h index 5fb2bd9c7034..c95689586e19 100644 --- a/drivers/thermal/thermal_core.h +++ b/drivers/thermal/thermal_core.h @@ -74,6 +74,11 @@ struct thermal_trip { int get_tz_trend(struct thermal_zone_device *tz, int trip); +struct thermal_instance * +get_thermal_instance(struct thermal_zone_device *tz, + struct thermal_cooling_device *cdev, + int trip); + /* * This structure is used to describe the behavior of * a certain cooling device on a certain trip point diff --git a/include/linux/thermal.h b/include/linux/thermal.h index 8006ba5de855..47e745c5dfca 100644 --- a/include/linux/thermal.h +++ b/include/linux/thermal.h @@ -414,8 +414,6 @@ int thermal_zone_get_temp(struct thermal_zone_device *tz, int *temp); int thermal_zone_get_slope(struct thermal_zone_device *tz); int thermal_zone_get_offset(struct thermal_zone_device *tz); -struct thermal_instance *get_thermal_instance(struct thermal_zone_device *, - struct thermal_cooling_device *, int); void thermal_cdev_update(struct thermal_cooling_device *); void thermal_notify_framework(struct thermal_zone_device *, int); #else @@ -473,10 +471,6 @@ static inline int thermal_zone_get_offset( struct thermal_zone_device *tz) { return -ENODEV; } -static inline struct thermal_instance * -get_thermal_instance(struct thermal_zone_device *tz, - struct thermal_cooling_device *cdev, int trip) -{ return ERR_PTR(-ENODEV); } static inline void thermal_cdev_update(struct thermal_cooling_device *cdev) { } static inline void thermal_notify_framework(struct thermal_zone_device *tz, -- 2.17.1