Lines Matching refs:th
27 struct thermal_events_ops *ops = &thp->th->ops->events;
119 thermal_error_t thermal_events_handle(struct thermal_handler *th, void *arg)
121 struct thermal_handler_param thp = { .th = th, .arg = arg };
123 if (!th)
126 if (nl_cb_set(th->cb_event, NL_CB_VALID, NL_CB_CUSTOM,
130 return nl_recvmsgs(th->sk_event, th->cb_event);
133 int thermal_events_fd(struct thermal_handler *th)
135 if (!th)
138 return nl_socket_get_fd(th->sk_event);
141 thermal_error_t thermal_events_exit(struct thermal_handler *th)
143 if (nl_unsubscribe_thermal(th->sk_event, th->cb_event,
147 nl_thermal_disconnect(th->sk_event, th->cb_event);
152 thermal_error_t thermal_events_init(struct thermal_handler *th)
154 thermal_events_ops_init(&th->ops->events);
156 if (nl_thermal_connect(&th->sk_event, &th->cb_event))
159 if (nl_subscribe_thermal(th->sk_event, th->cb_event,