Lines Matching refs:th_handle

2142 static struct snc_thermal_ctrl *th_handle;  variable
2161 if ((mode && !(th_handle->profiles & mode)) || mode >= THM_PROFILE_MAX) in sony_nc_thermal_mode_set()
2167 th_handle->mode = mode; in sony_nc_thermal_mode_set()
2189 if (!cnt || (th_handle->profiles & cnt)) in sony_nc_thermal_profiles_show()
2239 th_handle = kzalloc(sizeof(struct snc_thermal_ctrl), GFP_KERNEL); in sony_nc_thermal_setup()
2240 if (!th_handle) in sony_nc_thermal_setup()
2243 ret = sony_call_snc_handle(0x0122, 0x0000, &th_handle->profiles); in sony_nc_thermal_setup()
2254 th_handle->mode = ret; in sony_nc_thermal_setup()
2256 sysfs_attr_init(&th_handle->profiles_attr.attr); in sony_nc_thermal_setup()
2257 th_handle->profiles_attr.attr.name = "thermal_profiles"; in sony_nc_thermal_setup()
2258 th_handle->profiles_attr.attr.mode = S_IRUGO; in sony_nc_thermal_setup()
2259 th_handle->profiles_attr.show = sony_nc_thermal_profiles_show; in sony_nc_thermal_setup()
2261 sysfs_attr_init(&th_handle->mode_attr.attr); in sony_nc_thermal_setup()
2262 th_handle->mode_attr.attr.name = "thermal_control"; in sony_nc_thermal_setup()
2263 th_handle->mode_attr.attr.mode = S_IRUGO | S_IWUSR; in sony_nc_thermal_setup()
2264 th_handle->mode_attr.show = sony_nc_thermal_mode_show; in sony_nc_thermal_setup()
2265 th_handle->mode_attr.store = sony_nc_thermal_mode_store; in sony_nc_thermal_setup()
2267 ret = device_create_file(&pd->dev, &th_handle->profiles_attr); in sony_nc_thermal_setup()
2271 ret = device_create_file(&pd->dev, &th_handle->mode_attr); in sony_nc_thermal_setup()
2278 device_remove_file(&pd->dev, &th_handle->profiles_attr); in sony_nc_thermal_setup()
2280 kfree(th_handle); in sony_nc_thermal_setup()
2281 th_handle = NULL; in sony_nc_thermal_setup()
2287 if (th_handle) { in sony_nc_thermal_cleanup()
2288 device_remove_file(&pd->dev, &th_handle->profiles_attr); in sony_nc_thermal_cleanup()
2289 device_remove_file(&pd->dev, &th_handle->mode_attr); in sony_nc_thermal_cleanup()
2290 kfree(th_handle); in sony_nc_thermal_cleanup()
2291 th_handle = NULL; in sony_nc_thermal_cleanup()
2300 if (status != th_handle->mode) in sony_nc_thermal_resume()
2301 sony_nc_thermal_mode_set(th_handle->mode); in sony_nc_thermal_resume()