Skip to content

Commit 3c76fe7

Browse files
committed
Merge tag 'thermal-5.18-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull thermal control fixes from Rafael Wysocki: "These take back recent chages that started to confuse users and fix up an attr.show callback prototype in a driver. Specifics: - Stop warning about deprecation of the userspace thermal governor and cooling device status interface, because there are cases in which user space has to drive thermal management with the help of them (Daniel Lezcano) - Fix attr.show callback prototype in the int340x thermal driver (Kees Cook)" * tag 'thermal-5.18-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: thermal/governor: Remove deprecated information Revert "thermal/core: Deprecate changing cooling device state from userspace" thermal: int340x: Fix attr.show callback prototype
2 parents 659ed6e + a12475f commit 3c76fe7

File tree

4 files changed

+7
-9
lines changed

4 files changed

+7
-9
lines changed

drivers/thermal/Kconfig

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,10 @@ config THERMAL_DEFAULT_GOV_USER_SPACE
113113
bool "user_space"
114114
select THERMAL_GOV_USER_SPACE
115115
help
116-
Select this if you want to let the user space manage the
117-
platform thermals.
116+
The Userspace governor allows to get trip point crossed
117+
notification from the kernel via uevents. It is recommended
118+
to use the netlink interface instead which gives richer
119+
information about the thermal framework events.
118120

119121
config THERMAL_DEFAULT_GOV_POWER_ALLOCATOR
120122
bool "power_allocator"

drivers/thermal/gov_user_space.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@
1717

1818
static int user_space_bind(struct thermal_zone_device *tz)
1919
{
20-
pr_warn_once("Userspace governor deprecated: use thermal netlink " \
21-
"notification instead\n");
20+
pr_info_once("Consider using thermal netlink events interface\n");
2221

2322
return 0;
2423
}

drivers/thermal/intel/int340x_thermal/int3400_thermal.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ static int evaluate_odvp(struct int3400_thermal_priv *priv);
6868
struct odvp_attr {
6969
int odvp;
7070
struct int3400_thermal_priv *priv;
71-
struct kobj_attribute attr;
71+
struct device_attribute attr;
7272
};
7373

7474
static ssize_t data_vault_read(struct file *file, struct kobject *kobj,
@@ -311,7 +311,7 @@ static int int3400_thermal_get_uuids(struct int3400_thermal_priv *priv)
311311
return result;
312312
}
313313

314-
static ssize_t odvp_show(struct kobject *kobj, struct kobj_attribute *attr,
314+
static ssize_t odvp_show(struct device *dev, struct device_attribute *attr,
315315
char *buf)
316316
{
317317
struct odvp_attr *odvp_attr;

drivers/thermal/thermal_sysfs.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -610,9 +610,6 @@ cur_state_store(struct device *dev, struct device_attribute *attr,
610610
unsigned long state;
611611
int result;
612612

613-
dev_warn_once(&cdev->device,
614-
"Setting cooling device state is deprecated\n");
615-
616613
if (sscanf(buf, "%ld\n", &state) != 1)
617614
return -EINVAL;
618615

0 commit comments

Comments
 (0)