Lines Matching refs:policy

31 	struct stp_policy	*policy;  member
115 stm = policy_node->policy->stm; in stp_policy_node_masters_store()
162 stm = policy_node->policy->stm; in stp_policy_node_channels_store()
233 struct stp_policy *policy; in stp_policy_node_make() local
236 policy = container_of(group, struct stp_policy, group); in stp_policy_node_make()
240 policy = parent_node->policy; in stp_policy_node_make()
243 if (!policy->stm) in stp_policy_node_make()
246 pdrv = policy->stm->pdrv; in stp_policy_node_make()
256 if (policy->stm->pdrv_node_type) in stp_policy_node_make()
257 type = policy->stm->pdrv_node_type; in stp_policy_node_make()
261 policy_node->policy = policy; in stp_policy_node_make()
264 policy_node->first_master = policy->stm->data->sw_start; in stp_policy_node_make()
265 policy_node->last_master = policy->stm->data->sw_end; in stp_policy_node_make()
267 policy_node->last_channel = policy->stm->data->sw_nchannels - 1; in stp_policy_node_make()
296 struct stp_policy *policy = to_stp_policy(item); in stp_policy_device_show() local
300 (policy && policy->stm) ? in stp_policy_device_show()
301 policy->stm->data->name : in stp_policy_device_show()
312 struct stp_policy *policy = to_stp_policy(item); in stp_policy_protocol_show() local
316 (policy && policy->stm) ? in stp_policy_protocol_show()
317 policy->stm->pdrv->name : in stp_policy_protocol_show()
331 void stp_policy_unbind(struct stp_policy *policy) in stp_policy_unbind() argument
333 struct stm_device *stm = policy->stm; in stp_policy_unbind()
340 if (WARN_ON_ONCE(!policy->stm)) in stp_policy_unbind()
345 stm->policy = NULL; in stp_policy_unbind()
346 policy->stm = NULL; in stp_policy_unbind()
354 struct stp_policy *policy = to_stp_policy(item); in stp_policy_release() local
355 struct stm_device *stm = policy->stm; in stp_policy_release()
362 stp_policy_unbind(policy); in stp_policy_release()
365 kfree(policy); in stp_policy_release()
436 if (stm->policy) { in stp_policy_make()
441 stm->policy = kzalloc(sizeof(*stm->policy), GFP_KERNEL); in stp_policy_make()
442 if (!stm->policy) { in stp_policy_make()
447 config_group_init_type_name(&stm->policy->group, name, in stp_policy_make()
452 stm->policy->stm = stm; in stp_policy_make()
453 ret = &stm->policy->group; in stp_policy_make()
492 __stp_policy_node_lookup(struct stp_policy *policy, char *s) in __stp_policy_node_lookup() argument
495 struct list_head *head = &policy->group.cg_children; in __stp_policy_node_lookup()
541 if (stm->policy) in stp_policy_node_lookup()
542 policy_node = __stp_policy_node_lookup(stm->policy, s); in stp_policy_node_lookup()