Lines Matching refs:temp

55 	struct thermal_hwmon_temp *temp
58 struct thermal_zone_device *tz = temp->tz;
73 struct thermal_hwmon_temp *temp
76 struct thermal_zone_device *tz = temp->tz;
113 struct thermal_hwmon_temp *temp;
116 list_for_each_entry(temp, &hwmon->tz_list, hwmon_node)
117 if (temp->tz == tz) {
119 return temp;
128 int temp;
129 return tz->ops->get_crit_temp && !tz->ops->get_crit_temp(tz, &temp);
135 struct thermal_hwmon_temp *temp;
160 temp = kzalloc(sizeof(*temp), GFP_KERNEL);
161 if (!temp) {
166 temp->tz = tz;
169 snprintf(temp->temp_input.name, sizeof(temp->temp_input.name),
170 "temp%d_input", hwmon->count);
171 temp->temp_input.attr.attr.name = temp->temp_input.name;
172 temp->temp_input.attr.attr.mode = 0444;
173 temp->temp_input.attr.show = temp_input_show;
174 sysfs_attr_init(&temp->temp_input.attr.attr);
175 result = device_create_file(hwmon->device, &temp->temp_input.attr);
180 snprintf(temp->temp_crit.name,
181 sizeof(temp->temp_crit.name),
182 "temp%d_crit", hwmon->count);
183 temp->temp_crit.attr.attr.name = temp->temp_crit.name;
184 temp->temp_crit.attr.attr.mode = 0444;
185 temp->temp_crit.attr.show = temp_crit_show;
186 sysfs_attr_init(&temp->temp_crit.attr.attr);
188 &temp->temp_crit.attr);
196 list_add_tail(&temp->hwmon_node, &hwmon->tz_list);
202 device_remove_file(hwmon->device, &temp->temp_input.attr);
204 kfree(temp);
219 struct thermal_hwmon_temp *temp;
228 temp = thermal_hwmon_lookup_temp(hwmon, tz);
229 if (unlikely(!temp)) {
235 device_remove_file(hwmon->device, &temp->temp_input.attr);
237 device_remove_file(hwmon->device, &temp->temp_crit.attr);
240 list_del(&temp->hwmon_node);
241 kfree(temp);