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