aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/thermal/thermal_core.c8
-rw-r--r--include/linux/thermal.h4
2 files changed, 6 insertions, 6 deletions
diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c
index d4b54653ecf8..f1db49625555 100644
--- a/drivers/thermal/thermal_core.c
+++ b/drivers/thermal/thermal_core.c
@@ -688,7 +688,7 @@ trip_point_temp_store(struct device *dev, struct device_attribute *attr,
688{ 688{
689 struct thermal_zone_device *tz = to_thermal_zone(dev); 689 struct thermal_zone_device *tz = to_thermal_zone(dev);
690 int trip, ret; 690 int trip, ret;
691 unsigned long temperature; 691 int temperature;
692 692
693 if (!tz->ops->set_trip_temp) 693 if (!tz->ops->set_trip_temp)
694 return -EPERM; 694 return -EPERM;
@@ -696,7 +696,7 @@ trip_point_temp_store(struct device *dev, struct device_attribute *attr,
696 if (!sscanf(attr->attr.name, "trip_point_%d_temp", &trip)) 696 if (!sscanf(attr->attr.name, "trip_point_%d_temp", &trip))
697 return -EINVAL; 697 return -EINVAL;
698 698
699 if (kstrtoul(buf, 10, &temperature)) 699 if (kstrtoint(buf, 10, &temperature))
700 return -EINVAL; 700 return -EINVAL;
701 701
702 ret = tz->ops->set_trip_temp(tz, trip, temperature); 702 ret = tz->ops->set_trip_temp(tz, trip, temperature);
@@ -899,9 +899,9 @@ emul_temp_store(struct device *dev, struct device_attribute *attr,
899{ 899{
900 struct thermal_zone_device *tz = to_thermal_zone(dev); 900 struct thermal_zone_device *tz = to_thermal_zone(dev);
901 int ret = 0; 901 int ret = 0;
902 unsigned long temperature; 902 int temperature;
903 903
904 if (kstrtoul(buf, 10, &temperature)) 904 if (kstrtoint(buf, 10, &temperature))
905 return -EINVAL; 905 return -EINVAL;
906 906
907 if (!tz->ops->set_emul_temp) { 907 if (!tz->ops->set_emul_temp) {
diff --git a/include/linux/thermal.h b/include/linux/thermal.h
index a55d0523f75d..1b8a5a7876ce 100644
--- a/include/linux/thermal.h
+++ b/include/linux/thermal.h
@@ -352,8 +352,8 @@ struct thermal_zone_of_device_ops {
352 352
353struct thermal_trip { 353struct thermal_trip {
354 struct device_node *np; 354 struct device_node *np;
355 unsigned long int temperature; 355 int temperature;
356 unsigned long int hysteresis; 356 int hysteresis;
357 enum thermal_trip_type type; 357 enum thermal_trip_type type;
358}; 358};
359 359