Lines Matching full:th
78 static int __thermal_zone_discover(struct thermal_zone *tz, void *th) in __thermal_zone_discover() argument
80 if (thermal_cmd_get_trip(th, tz) < 0) in __thermal_zone_discover()
83 if (thermal_cmd_get_governor(th, tz)) in __thermal_zone_discover()
89 struct thermal_zone *thermal_zone_discover(struct thermal_handler *th) in thermal_zone_discover() argument
93 if (thermal_cmd_get_tz(th, &tz) < 0) in thermal_zone_discover()
96 if (for_each_thermal_zone(tz, __thermal_zone_discover, th)) in thermal_zone_discover()
102 void thermal_exit(struct thermal_handler *th) in thermal_exit() argument
104 thermal_cmd_exit(th); in thermal_exit()
105 thermal_events_exit(th); in thermal_exit()
106 thermal_sampling_exit(th); in thermal_exit()
108 free(th); in thermal_exit()
113 struct thermal_handler *th; in thermal_init() local
115 th = malloc(sizeof(*th)); in thermal_init()
116 if (!th) in thermal_init()
118 th->ops = ops; in thermal_init()
120 if (thermal_events_init(th)) in thermal_init()
123 if (thermal_sampling_init(th)) in thermal_init()
126 if (thermal_cmd_init(th)) in thermal_init()
129 return th; in thermal_init()
132 free(th); in thermal_init()