+4
-4
drivers/thermal/thermal_core.c
+4
-4
drivers/thermal/thermal_core.c
···
688
688
{
689
689
struct thermal_zone_device *tz = to_thermal_zone(dev);
690
690
int trip, ret;
691
-
unsigned long temperature;
691
+
int temperature;
692
692
693
693
if (!tz->ops->set_trip_temp)
694
694
return -EPERM;
···
696
696
if (!sscanf(attr->attr.name, "trip_point_%d_temp", &trip))
697
697
return -EINVAL;
698
698
699
-
if (kstrtoul(buf, 10, &temperature))
699
+
if (kstrtoint(buf, 10, &temperature))
700
700
return -EINVAL;
701
701
702
702
ret = tz->ops->set_trip_temp(tz, trip, temperature);
···
899
899
{
900
900
struct thermal_zone_device *tz = to_thermal_zone(dev);
901
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
905
return -EINVAL;
906
906
907
907
if (!tz->ops->set_emul_temp) {