• Home
  • Raw
  • Download

Lines Matching refs:ce

321 static void __of_changeset_entry_destroy(struct of_changeset_entry *ce)  in __of_changeset_entry_destroy()  argument
323 of_node_put(ce->np); in __of_changeset_entry_destroy()
324 list_del(&ce->node); in __of_changeset_entry_destroy()
325 kfree(ce); in __of_changeset_entry_destroy()
329 static void __of_changeset_entry_dump(struct of_changeset_entry *ce) in __of_changeset_entry_dump() argument
331 switch (ce->action) { in __of_changeset_entry_dump()
334 ce, "ADD_PROPERTY ", ce->np->full_name, in __of_changeset_entry_dump()
335 ce->prop->name); in __of_changeset_entry_dump()
339 ce, "REMOVE_PROPERTY", ce->np->full_name, in __of_changeset_entry_dump()
340 ce->prop->name); in __of_changeset_entry_dump()
344 ce, "UPDATE_PROPERTY", ce->np->full_name, in __of_changeset_entry_dump()
345 ce->prop->name); in __of_changeset_entry_dump()
349 ce, "ATTACH_NODE ", ce->np->full_name); in __of_changeset_entry_dump()
353 ce, "DETACH_NODE ", ce->np->full_name); in __of_changeset_entry_dump()
358 static inline void __of_changeset_entry_dump(struct of_changeset_entry *ce) in __of_changeset_entry_dump() argument
364 static void __of_changeset_entry_invert(struct of_changeset_entry *ce, in __of_changeset_entry_invert() argument
367 memcpy(rce, ce, sizeof(*rce)); in __of_changeset_entry_invert()
369 switch (ce->action) { in __of_changeset_entry_invert()
383 rce->old_prop = ce->prop; in __of_changeset_entry_invert()
384 rce->prop = ce->old_prop; in __of_changeset_entry_invert()
389 static void __of_changeset_entry_notify(struct of_changeset_entry *ce, bool revert) in __of_changeset_entry_notify() argument
395 __of_changeset_entry_invert(ce, &ce_inverted); in __of_changeset_entry_notify()
396 ce = &ce_inverted; in __of_changeset_entry_notify()
399 switch (ce->action) { in __of_changeset_entry_notify()
402 ret = of_reconfig_notify(ce->action, ce->np); in __of_changeset_entry_notify()
407 ret = of_property_notify(ce->action, ce->np, ce->prop, ce->old_prop); in __of_changeset_entry_notify()
411 (int)ce->action); in __of_changeset_entry_notify()
416 pr_err("%s: notifier error @%s\n", __func__, ce->np->full_name); in __of_changeset_entry_notify()
419 static int __of_changeset_entry_apply(struct of_changeset_entry *ce) in __of_changeset_entry_apply() argument
425 __of_changeset_entry_dump(ce); in __of_changeset_entry_apply()
428 switch (ce->action) { in __of_changeset_entry_apply()
430 __of_attach_node(ce->np); in __of_changeset_entry_apply()
433 __of_detach_node(ce->np); in __of_changeset_entry_apply()
437 for (propp = &ce->np->deadprops; *propp; propp = &(*propp)->next) { in __of_changeset_entry_apply()
438 if (*propp == ce->prop) { in __of_changeset_entry_apply()
439 *propp = ce->prop->next; in __of_changeset_entry_apply()
440 ce->prop->next = NULL; in __of_changeset_entry_apply()
445 ret = __of_add_property(ce->np, ce->prop); in __of_changeset_entry_apply()
448 __func__, ce->np->full_name, in __of_changeset_entry_apply()
449 ce->prop->name); in __of_changeset_entry_apply()
454 ret = __of_remove_property(ce->np, ce->prop); in __of_changeset_entry_apply()
457 __func__, ce->np->full_name, in __of_changeset_entry_apply()
458 ce->prop->name); in __of_changeset_entry_apply()
465 for (propp = &ce->np->deadprops; *propp; propp = &(*propp)->next) { in __of_changeset_entry_apply()
466 if (*propp == ce->prop) { in __of_changeset_entry_apply()
467 *propp = ce->prop->next; in __of_changeset_entry_apply()
468 ce->prop->next = NULL; in __of_changeset_entry_apply()
473 ret = __of_update_property(ce->np, ce->prop, &old_prop); in __of_changeset_entry_apply()
476 __func__, ce->np->full_name, in __of_changeset_entry_apply()
477 ce->prop->name); in __of_changeset_entry_apply()
489 switch (ce->action) { in __of_changeset_entry_apply()
491 __of_attach_node_sysfs(ce->np); in __of_changeset_entry_apply()
494 __of_detach_node_sysfs(ce->np); in __of_changeset_entry_apply()
498 __of_add_property_sysfs(ce->np, ce->prop); in __of_changeset_entry_apply()
501 __of_remove_property_sysfs(ce->np, ce->prop); in __of_changeset_entry_apply()
504 __of_update_property_sysfs(ce->np, ce->prop, ce->old_prop); in __of_changeset_entry_apply()
511 static inline int __of_changeset_entry_revert(struct of_changeset_entry *ce) in __of_changeset_entry_revert() argument
515 __of_changeset_entry_invert(ce, &ce_inverted); in __of_changeset_entry_revert()
542 struct of_changeset_entry *ce, *cen; in of_changeset_destroy() local
544 list_for_each_entry_safe_reverse(ce, cen, &ocs->entries, node) in of_changeset_destroy()
545 __of_changeset_entry_destroy(ce); in of_changeset_destroy()
562 struct of_changeset_entry *ce; in of_changeset_apply() local
567 list_for_each_entry(ce, &ocs->entries, node) { in of_changeset_apply()
568 ret = __of_changeset_entry_apply(ce); in of_changeset_apply()
571 list_for_each_entry_continue_reverse(ce, &ocs->entries, node) in of_changeset_apply()
572 __of_changeset_entry_revert(ce); in of_changeset_apply()
580 list_for_each_entry(ce, &ocs->entries, node) in of_changeset_apply()
581 __of_changeset_entry_notify(ce, 0); in of_changeset_apply()
601 struct of_changeset_entry *ce; in of_changeset_revert() local
605 list_for_each_entry_reverse(ce, &ocs->entries, node) { in of_changeset_revert()
606 ret = __of_changeset_entry_revert(ce); in of_changeset_revert()
609 list_for_each_entry_continue(ce, &ocs->entries, node) in of_changeset_revert()
610 __of_changeset_entry_apply(ce); in of_changeset_revert()
618 list_for_each_entry_reverse(ce, &ocs->entries, node) in of_changeset_revert()
619 __of_changeset_entry_notify(ce, 1); in of_changeset_revert()
645 struct of_changeset_entry *ce; in of_changeset_action() local
647 ce = kzalloc(sizeof(*ce), GFP_KERNEL); in of_changeset_action()
648 if (!ce) { in of_changeset_action()
653 ce->action = action; in of_changeset_action()
654 ce->np = of_node_get(np); in of_changeset_action()
655 ce->prop = prop; in of_changeset_action()
658 ce->old_prop = of_find_property(np, prop->name, NULL); in of_changeset_action()
661 list_add_tail(&ce->node, &ocs->entries); in of_changeset_action()