Lines Matching defs:th
27 struct thermal_events_ops *ops = &thp->th->ops->events;
148 thermal_error_t thermal_events_handle(struct thermal_handler *th, void *arg)
150 struct thermal_handler_param thp = { .th = th, .arg = arg };
152 if (!th)
155 if (nl_cb_set(th->cb_event, NL_CB_VALID, NL_CB_CUSTOM,
159 return nl_recvmsgs(th->sk_event, th->cb_event);
162 int thermal_events_fd(struct thermal_handler *th)
164 if (!th)
167 return nl_socket_get_fd(th->sk_event);
170 thermal_error_t thermal_events_exit(struct thermal_handler *th)
172 if (nl_unsubscribe_thermal(th->sk_event, th->cb_event,
176 nl_thermal_disconnect(th->sk_event, th->cb_event);
181 thermal_error_t thermal_events_init(struct thermal_handler *th)
183 thermal_events_ops_init(&th->ops->events);
185 if (nl_thermal_connect(&th->sk_event, &th->cb_event))
188 if (nl_subscribe_thermal(th->sk_event, th->cb_event,