Lines Matching defs:tz
34 int for_each_thermal_zone(struct thermal_zone *tz, cb_tz_t cb, void *arg)
38 if (!tz)
41 for (i = 0; tz[i].id != -1; i++)
42 ret |= cb(&tz[i], arg);
47 struct thermal_zone *thermal_zone_find_by_name(struct thermal_zone *tz,
52 if (!tz || !name)
55 for (i = 0; tz[i].id != -1; i++) {
56 if (!strcmp(tz[i].name, name))
57 return &tz[i];
63 struct thermal_zone *thermal_zone_find_by_id(struct thermal_zone *tz, int id)
67 if (!tz || id < 0)
70 for (i = 0; tz[i].id != -1; i++) {
71 if (tz[i].id == id)
72 return &tz[i];
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))
91 struct thermal_zone *tz;
93 if (thermal_cmd_get_tz(th, &tz) < 0)
96 if (for_each_thermal_zone(tz, __thermal_zone_discover, th))
99 return tz;