Lines Matching refs:temp

56 	struct thermal_hwmon_temp *temp
59 struct thermal_zone_device *tz = temp->tz;
74 struct thermal_hwmon_temp *temp
77 struct thermal_zone_device *tz = temp->tz;
122 struct thermal_hwmon_temp *temp;
125 list_for_each_entry(temp, &hwmon->tz_list, hwmon_node)
126 if (temp->tz == tz) {
128 return temp;
137 int temp;
138 return tz->ops->get_crit_temp && !tz->ops->get_crit_temp(tz, &temp);
144 struct thermal_hwmon_temp *temp;
169 temp = kzalloc(sizeof(*temp), GFP_KERNEL);
170 if (!temp) {
175 temp->tz = tz;
178 snprintf(temp->temp_input.name, sizeof(temp->temp_input.name),
179 "temp%d_input", hwmon->count);
180 temp->temp_input.attr.attr.name = temp->temp_input.name;
181 temp->temp_input.attr.attr.mode = 0444;
182 temp->temp_input.attr.show = temp_input_show;
183 sysfs_attr_init(&temp->temp_input.attr.attr);
184 result = device_create_file(hwmon->device, &temp->temp_input.attr);
189 snprintf(temp->temp_crit.name,
190 sizeof(temp->temp_crit.name),
191 "temp%d_crit", hwmon->count);
192 temp->temp_crit.attr.attr.name = temp->temp_crit.name;
193 temp->temp_crit.attr.attr.mode = 0444;
194 temp->temp_crit.attr.show = temp_crit_show;
195 sysfs_attr_init(&temp->temp_crit.attr.attr);
197 &temp->temp_crit.attr);
205 list_add_tail(&temp->hwmon_node, &hwmon->tz_list);
211 device_remove_file(hwmon->device, &temp->temp_input.attr);
213 kfree(temp);
227 struct thermal_hwmon_temp *temp;
236 temp = thermal_hwmon_lookup_temp(hwmon, tz);
237 if (unlikely(!temp)) {
243 device_remove_file(hwmon->device, &temp->temp_input.attr);
245 device_remove_file(hwmon->device, &temp->temp_crit.attr);
248 list_del(&temp->hwmon_node);
249 kfree(temp);