]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
thermal: core: Unexport thermal_bind_cdev_to_trip() and thermal_unbind_cdev_from_trip()
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 19 Aug 2024 16:05:00 +0000 (18:05 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 22 Aug 2024 15:43:14 +0000 (17:43 +0200)
Since thermal_bind_cdev_to_trip() and thermal_unbind_cdev_from_trip()
are only called locally in the thermal core now, they can be static,
so change their definitions accordingly and drop their headers from
the global thermal header file.

No intentional functional impact.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Zhang Rui <rui.zhang@intel.com>
Acked-by: Huisong Li <lihuisong@huawei.com>
Reviewed-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://patch.msgid.link/3512161.QJadu78ljV@rjwysocki.net
drivers/thermal/thermal_core.c
include/linux/thermal.h

index 2faa95083320e85a5f2df70b5a9e0d3aa0b1130d..68fb85c18afa41b0588ec25e9b3b5cb5af7e3ff9 100644 (file)
@@ -781,7 +781,7 @@ struct thermal_zone_device *thermal_zone_get_by_id(int id)
  *
  * Return: 0 on success, the proper error value otherwise.
  */
-int thermal_bind_cdev_to_trip(struct thermal_zone_device *tz,
+static int thermal_bind_cdev_to_trip(struct thermal_zone_device *tz,
                                     const struct thermal_trip *trip,
                                     struct thermal_cooling_device *cdev,
                                     unsigned long upper, unsigned long lower,
@@ -885,7 +885,6 @@ free_mem:
        kfree(dev);
        return result;
 }
-EXPORT_SYMBOL_GPL(thermal_bind_cdev_to_trip);
 
 int thermal_zone_bind_cooling_device(struct thermal_zone_device *tz,
                                     int trip_index,
@@ -921,9 +920,9 @@ EXPORT_SYMBOL_GPL(thermal_zone_bind_cooling_device);
  *
  * Return: 0 on success, the proper error value otherwise.
  */
-int thermal_unbind_cdev_from_trip(struct thermal_zone_device *tz,
-                                 const struct thermal_trip *trip,
-                                 struct thermal_cooling_device *cdev)
+static int thermal_unbind_cdev_from_trip(struct thermal_zone_device *tz,
+                                        const struct thermal_trip *trip,
+                                        struct thermal_cooling_device *cdev)
 {
        struct thermal_instance *pos, *next;
 
@@ -953,7 +952,6 @@ unbind:
        kfree(pos);
        return 0;
 }
-EXPORT_SYMBOL_GPL(thermal_unbind_cdev_from_trip);
 
 int thermal_zone_unbind_cooling_device(struct thermal_zone_device *tz,
                                       int trip_index,
index 9c5d1f14224f5b778cf01b96443841bb9f497588..6599a26847f7832e994e251fa502fb6cf884c7bf 100644 (file)
@@ -247,18 +247,10 @@ const char *thermal_zone_device_type(struct thermal_zone_device *tzd);
 int thermal_zone_device_id(struct thermal_zone_device *tzd);
 struct device *thermal_zone_device(struct thermal_zone_device *tzd);
 
-int thermal_bind_cdev_to_trip(struct thermal_zone_device *tz,
-                             const struct thermal_trip *trip,
-                             struct thermal_cooling_device *cdev,
-                             unsigned long upper, unsigned long lower,
-                             unsigned int weight);
 int thermal_zone_bind_cooling_device(struct thermal_zone_device *, int,
                                     struct thermal_cooling_device *,
                                     unsigned long, unsigned long,
                                     unsigned int);
-int thermal_unbind_cdev_from_trip(struct thermal_zone_device *tz,
-                                 const struct thermal_trip *trip,
-                                 struct thermal_cooling_device *cdev);
 int thermal_zone_unbind_cooling_device(struct thermal_zone_device *, int,
                                       struct thermal_cooling_device *);
 void thermal_zone_device_update(struct thermal_zone_device *,