Lines Matching defs:device
22 /* thermal zone devices with the same type share one hwmon device */
25 struct device *device;
49 temp_input_show(struct device *dev, struct device_attribute *attr, char *buf)
69 temp_crit_show(struct device *dev, struct device_attribute *attr, char *buf)
152 hwmon->device = hwmon_device_register_with_info(&tz->device, hwmon->type,
154 if (IS_ERR(hwmon->device)) {
155 result = PTR_ERR(hwmon->device);
175 result = device_create_file(hwmon->device, &temp->temp_input.attr);
187 result = device_create_file(hwmon->device,
202 device_remove_file(hwmon->device, &temp->temp_input.attr);
207 hwmon_device_unregister(hwmon->device);
224 dev_dbg(&tz->device, "hwmon device lookup failed!\n");
231 dev_dbg(&tz->device, "temperature input lookup failed!\n");
235 device_remove_file(hwmon->device, &temp->temp_input.attr);
237 device_remove_file(hwmon->device, &temp->temp_crit.attr);
249 hwmon_device_unregister(hwmon->device);
254 static void devm_thermal_hwmon_release(struct device *dev, void *res)
276 devres_add(&tz->device, ptr);