Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp3685751ybb; Tue, 31 Mar 2020 09:58:22 -0700 (PDT) X-Google-Smtp-Source: ADFU+vuilpYyAVBMxt7M5y8s9pQn2QLRsvAgcIUOXZx03VnZVvpMrUJRr1NWfM2+9fvhezcWSX77 X-Received: by 2002:a4a:674f:: with SMTP id j15mr14250505oof.41.1585673902637; Tue, 31 Mar 2020 09:58:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585673902; cv=none; d=google.com; s=arc-20160816; b=Q9g4V3bayya263mV0SyXqNwZg74SK3tSJ73k7R3CsWQVCFBQx2xj5JEy7i1qz1iRL3 lltyJtO2WSkuxygYHNCSKfY/g44462Q2da9ju5aziy5/oy9ER96MxTTLTXjyeDao1N6G SQCNdKVSjB8lyOGUL5mDKAic57bSIoWTT9W8gPyiyauIIBxDvqfycIpkF2Vo/mZdVW+r rDapuGDyye3PdT6odFAfg36fhDqwmQPaMtLzT2Ei9W54Iyn3SxJczJXFhHlWbExyJnfk Bd8CiNH4tWQiBBe36RnMRzYCNJjpeYO30sG89cRwcF+bp6tjN9H3u9d23W9vqiqU7R6B qu8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=Y/abDyeAK7rGBvYDyizWyVwlF1sauFbaXbJ9R6MBx2w=; b=H3JBl8fok86BthWK+evj3fP27Odj7WWXFa0KPLCB5JqMysKd9bMhKoWWotFK3GHlev llg7xcpJYqI1aIvg1n5Sh/WRF5wWrhSySp+ox4/d/dzKAH0SnbdmHPPgC2EM2OfctsbM jsfg/tvxXsSEpFlzBR2Bq/utM/O8gpDSv6P+/gm3ogUNiklaNoOeJ/b8ctZ9n5xu1wMZ pNGvqyouVHAP+U5/rAZd5mGX/xfaaOOxnqDylHsOfdbhYIFav3E0VS62/+Fty1h5ohaJ HHfSIGjyW0RQZNw8FjWtAdAHHwZ1Om0nYArBWj3u7tlESaLHmhctOJaYcTv7rp8d2O48 rkDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="tCL/dJ+W"; 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 a190si6688077oib.146.2020.03.31.09.58.09; Tue, 31 Mar 2020 09:58:22 -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="tCL/dJ+W"; 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 S1731290AbgCaQ5C (ORCPT + 99 others); Tue, 31 Mar 2020 12:57:02 -0400 Received: from mail-wr1-f67.google.com ([209.85.221.67]:33018 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730589AbgCaQ5B (ORCPT ); Tue, 31 Mar 2020 12:57:01 -0400 Received: by mail-wr1-f67.google.com with SMTP id a25so26991862wrd.0 for ; Tue, 31 Mar 2020 09:57:00 -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; bh=Y/abDyeAK7rGBvYDyizWyVwlF1sauFbaXbJ9R6MBx2w=; b=tCL/dJ+Wt5JYGy7iTzNg1GIRUfoWm7de+Xaha+6IB5H71tL8ayUKv+ZnqKlrlyjBrU /jGZDm1b0DSUeiDJQxSgIrDGOPBJlHgTpAOE5GrNI/yMSAYQysdD/39ThvKY7BPUvFrI Sk07stASDb4c8s2924NzVil3jcUBKY05PGQ/IwQ0Ne0OfjYRMxFD7A2UbZhTwaeHkKSI /j3HAY5BChzX5mET9uMaIS7dHTaG7xphLcXMgoR8orOXRHhijJBxGk/8nAvhxfBmS3di S8G6zDjIMbF88UugwnHg6Zs4faAcUQTK9zoCtfAO2XSVhM9CedAyS5EzP9aJ9LUs3Q8d QTyg== 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; bh=Y/abDyeAK7rGBvYDyizWyVwlF1sauFbaXbJ9R6MBx2w=; b=LXJQVcAxQHZiENVnyFksnb3DrIFlwDub3rgt3DzFzuT68KGOdlsRsP8PbNIXnuwLQI rNf0ul7+2tTsXJl0+BfzmLPrDSf57NvGdMRQDde/dDzSGvRLwPlC03xr7IzuzJDgimJd Q7Kteiy1Ls/Yp+avVSamQMlDwII7r6tNAhRNN7u+Q3V2ZzNSkoHJSPmu0hfrYpCCTFC1 gVzYCiI54fgTIrFFjd1tzVlescKvGImlDVsC98Zll3ilz+oCw8dkj68ez5HHUbyPYpV5 ENSaAttJmWoWFxNy8aBOt5BJWnMswcXVyzIciAGSVbN9b5DlYT1gyEBj9UKSDzlrePLU BRCA== X-Gm-Message-State: ANhLgQ2z043qqd5fq3A3q1PLtqzSMblb/LUnMwWc5Sv9Lj/HQSIPPL/7 VQLLfsUea6o2gChk74+pB/aKXg== X-Received: by 2002:a05:6000:11c6:: with SMTP id i6mr22412859wrx.115.1585673819466; Tue, 31 Mar 2020 09:56:59 -0700 (PDT) Received: from localhost.localdomain ([2a01:e34:ed2f:f020:497e:e6a9:b3eb:fcac]) by smtp.gmail.com with ESMTPSA id d7sm12925648wrr.77.2020.03.31.09.56.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Mar 2020 09:56:58 -0700 (PDT) From: Daniel Lezcano To: daniel.lezcano@linaro.org Cc: Zhang Rui , Amit Kucheria , linux-pm@vger.kernel.org (open list:THERMAL), linux-kernel@vger.kernel.org (open list) Subject: [PATCH 1/2] thermal: core: Make thermal_zone_set_trips private Date: Tue, 31 Mar 2020 18:54:48 +0200 Message-Id: <20200331165449.30355-1-daniel.lezcano@linaro.org> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The function thermal_zone_set_trips() is used by the thermal core code in order to update the next trip points, there are no other users. Move the function definition in the thermal_core.h, remove the EXPORT_SYMBOL_GPL and document the function. Signed-off-by: Daniel Lezcano --- drivers/thermal/thermal_core.h | 3 +++ drivers/thermal/thermal_helpers.c | 13 ++++++++++++- include/linux/thermal.h | 3 --- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/drivers/thermal/thermal_core.h b/drivers/thermal/thermal_core.h index a9bf00e91d64..37cd4e2bead2 100644 --- a/drivers/thermal/thermal_core.h +++ b/drivers/thermal/thermal_core.h @@ -69,6 +69,9 @@ void thermal_zone_device_unbind_exception(struct thermal_zone_device *, int thermal_zone_device_set_policy(struct thermal_zone_device *, char *); int thermal_build_list_of_policies(char *buf); +/* Helpers */ +void thermal_zone_set_trips(struct thermal_zone_device *tz); + /* sysfs I/F */ int thermal_zone_create_device_groups(struct thermal_zone_device *, int); void thermal_zone_destroy_device_groups(struct thermal_zone_device *); diff --git a/drivers/thermal/thermal_helpers.c b/drivers/thermal/thermal_helpers.c index 2ba756af76b7..59eaf2d0fdb3 100644 --- a/drivers/thermal/thermal_helpers.c +++ b/drivers/thermal/thermal_helpers.c @@ -113,6 +113,18 @@ int thermal_zone_get_temp(struct thermal_zone_device *tz, int *temp) } EXPORT_SYMBOL_GPL(thermal_zone_get_temp); +/** + * thermal_zone_set_trips - Computes the next trip points for the driver + * @tz: a pointer to a thermal zone device structure + * + * The function computes the next temperature boundaries by browsing + * the trip points. The result is the closer low and high trip points + * to the current temperature. These values are passed to the backend + * driver to let it set its own notification mechanism (usually an + * interrupt). + * + * It does not return a value + */ void thermal_zone_set_trips(struct thermal_zone_device *tz) { int low = -INT_MAX; @@ -161,7 +173,6 @@ void thermal_zone_set_trips(struct thermal_zone_device *tz) exit: mutex_unlock(&tz->lock); } -EXPORT_SYMBOL_GPL(thermal_zone_set_trips); void thermal_cdev_update(struct thermal_cooling_device *cdev) { diff --git a/include/linux/thermal.h b/include/linux/thermal.h index c91b1e344d56..448841ab0dca 100644 --- a/include/linux/thermal.h +++ b/include/linux/thermal.h @@ -439,7 +439,6 @@ int thermal_zone_unbind_cooling_device(struct thermal_zone_device *, int, struct thermal_cooling_device *); void thermal_zone_device_update(struct thermal_zone_device *, enum thermal_notify_event); -void thermal_zone_set_trips(struct thermal_zone_device *); struct thermal_cooling_device *thermal_cooling_device_register(const char *, void *, const struct thermal_cooling_device_ops *); @@ -497,8 +496,6 @@ static inline int thermal_zone_unbind_cooling_device( static inline void thermal_zone_device_update(struct thermal_zone_device *tz, enum thermal_notify_event event) { } -static inline void thermal_zone_set_trips(struct thermal_zone_device *tz) -{ } static inline struct thermal_cooling_device * thermal_cooling_device_register(char *type, void *devdata, const struct thermal_cooling_device_ops *ops) -- 2.17.1