Lines Matching refs:policy

31 	struct stp_policy	*policy;  member
110 stm = policy_node->policy->stm; in stp_policy_node_masters_store()
157 stm = policy_node->policy->stm; in stp_policy_node_channels_store()
228 struct stp_policy *policy; in stp_policy_node_make() local
231 policy = container_of(group, struct stp_policy, group); in stp_policy_node_make()
235 policy = parent_node->policy; in stp_policy_node_make()
238 if (!policy->stm) in stp_policy_node_make()
241 pdrv = policy->stm->pdrv; in stp_policy_node_make()
251 if (policy->stm->pdrv_node_type) in stp_policy_node_make()
252 type = policy->stm->pdrv_node_type; in stp_policy_node_make()
256 policy_node->policy = policy; in stp_policy_node_make()
259 policy_node->first_master = policy->stm->data->sw_start; in stp_policy_node_make()
260 policy_node->last_master = policy->stm->data->sw_end; in stp_policy_node_make()
262 policy_node->last_channel = policy->stm->data->sw_nchannels - 1; in stp_policy_node_make()
291 struct stp_policy *policy = to_stp_policy(item); in stp_policy_device_show() local
295 (policy && policy->stm) ? in stp_policy_device_show()
296 policy->stm->data->name : in stp_policy_device_show()
307 struct stp_policy *policy = to_stp_policy(item); in stp_policy_protocol_show() local
311 (policy && policy->stm) ? in stp_policy_protocol_show()
312 policy->stm->pdrv->name : in stp_policy_protocol_show()
326 void stp_policy_unbind(struct stp_policy *policy) in stp_policy_unbind() argument
328 struct stm_device *stm = policy->stm; in stp_policy_unbind()
335 if (WARN_ON_ONCE(!policy->stm)) in stp_policy_unbind()
340 stm->policy = NULL; in stp_policy_unbind()
341 policy->stm = NULL; in stp_policy_unbind()
353 struct stp_policy *policy = to_stp_policy(item); in stp_policy_release() local
354 struct stm_device *stm = policy->stm; in stp_policy_release()
361 stp_policy_unbind(policy); in stp_policy_release()
364 kfree(policy); in stp_policy_release()
435 if (stm->policy) { in stp_policy_make()
440 stm->policy = kzalloc(sizeof(*stm->policy), GFP_KERNEL); in stp_policy_make()
441 if (!stm->policy) { in stp_policy_make()
446 config_group_init_type_name(&stm->policy->group, name, in stp_policy_make()
451 stm->policy->stm = stm; in stp_policy_make()
452 ret = &stm->policy->group; in stp_policy_make()
491 __stp_policy_node_lookup(struct stp_policy *policy, char *s) in __stp_policy_node_lookup() argument
494 struct list_head *head = &policy->group.cg_children; in __stp_policy_node_lookup()
540 if (stm->policy) in stp_policy_node_lookup()
541 policy_node = __stp_policy_node_lookup(stm->policy, s); in stp_policy_node_lookup()