thermal_hwmon.c (e5451c8f8330e03ad3cfa16048b4daf961af434f) | thermal_hwmon.c (f4c592439b144ef1de66eac764140643a54099eb) |
---|---|
1/* 2 * thermal_hwmon.c - Generic Thermal Management hwmon support. 3 * 4 * Code based on Intel thermal_core.c. Copyrights of the original code: 5 * Copyright (C) 2008 Intel Corp 6 * Copyright (C) 2008 Zhang Rui <rui.zhang@intel.com> 7 * Copyright (C) 2008 Sujith Thomas <sujith.thomas@intel.com> 8 * --- 218 unchanged lines hidden (view full) --- 227 hwmon_device_unregister(hwmon->device); 228 } 229 free_mem: 230 if (new_hwmon_device) 231 kfree(hwmon); 232 233 return result; 234} | 1/* 2 * thermal_hwmon.c - Generic Thermal Management hwmon support. 3 * 4 * Code based on Intel thermal_core.c. Copyrights of the original code: 5 * Copyright (C) 2008 Intel Corp 6 * Copyright (C) 2008 Zhang Rui <rui.zhang@intel.com> 7 * Copyright (C) 2008 Sujith Thomas <sujith.thomas@intel.com> 8 * --- 218 unchanged lines hidden (view full) --- 227 hwmon_device_unregister(hwmon->device); 228 } 229 free_mem: 230 if (new_hwmon_device) 231 kfree(hwmon); 232 233 return result; 234} |
235EXPORT_SYMBOL_GPL(thermal_add_hwmon_sysfs); |
|
235 236void thermal_remove_hwmon_sysfs(struct thermal_zone_device *tz) 237{ 238 struct thermal_hwmon_device *hwmon; 239 struct thermal_hwmon_temp *temp; 240 241 hwmon = thermal_hwmon_lookup_by_type(tz); 242 if (unlikely(!hwmon)) { --- 22 unchanged lines hidden (view full) --- 265 } 266 list_del(&hwmon->node); 267 mutex_unlock(&thermal_hwmon_list_lock); 268 269 device_remove_file(hwmon->device, &dev_attr_name); 270 hwmon_device_unregister(hwmon->device); 271 kfree(hwmon); 272} | 236 237void thermal_remove_hwmon_sysfs(struct thermal_zone_device *tz) 238{ 239 struct thermal_hwmon_device *hwmon; 240 struct thermal_hwmon_temp *temp; 241 242 hwmon = thermal_hwmon_lookup_by_type(tz); 243 if (unlikely(!hwmon)) { --- 22 unchanged lines hidden (view full) --- 266 } 267 list_del(&hwmon->node); 268 mutex_unlock(&thermal_hwmon_list_lock); 269 270 device_remove_file(hwmon->device, &dev_attr_name); 271 hwmon_device_unregister(hwmon->device); 272 kfree(hwmon); 273} |
274EXPORT_SYMBOL_GPL(thermal_remove_hwmon_sysfs); |
|