Lines Matching +full:- +full:- +full:count

1 // SPDX-License-Identifier: BSD-2-Clause
21 static const char no_name[] = "no-name";
27 (!is_unpaged((void *)(vaddr_t)pm_hdl->callback) || in verify_cb_args()
28 (pm_hdl->handle && !is_unpaged(pm_hdl->handle)))) { in verify_cb_args()
30 (void *)(vaddr_t)pm_hdl->callback, pm_hdl->handle); in verify_cb_args()
38 const char *name = pm_hdl->name; in register_pm_cb()
39 size_t count = pm_cb_count; in register_pm_cb() local
55 ref = realloc(pm_cb_ref, sizeof(*ref) * (count + 1)); in register_pm_cb()
59 ref[count] = *pm_hdl; in register_pm_cb()
60 ref[count].flags = 0; in register_pm_cb()
61 ref[count].name = name; in register_pm_cb()
63 pm_cb_count = count + 1; in register_pm_cb()
77 if (pm_cb_ref[n].callback == pm_hdl->callback && in unregister_pm_cb()
78 pm_cb_ref[n].handle == pm_hdl->handle && in unregister_pm_cb()
79 pm_cb_ref[n].order == pm_hdl->order) in unregister_pm_cb()
83 pm_cb_count--; in unregister_pm_cb()
85 (pm_cb_count - n) * sizeof(*pm_cb_ref)); in unregister_pm_cb()
97 if (suspending == (bool)(hdl->flags & PM_FLAG_SUSPENDED)) in do_pm_callback()
100 DMSG("%s %s", suspending ? "Suspend" : "Resume", hdl->name); in do_pm_callback()
102 res = hdl->callback(op, pm_hint, hdl); in do_pm_callback()
105 "Resume", hdl->name, (void *)(vaddr_t)hdl->callback, res); in do_pm_callback()
110 hdl->flags |= PM_FLAG_SUSPENDED; in do_pm_callback()
112 hdl->flags &= ~PM_FLAG_SUSPENDED; in do_pm_callback()
129 hdl = pm_cb_ref + pm_cb_count - 1; in call_callbacks()
134 if (hdl->order == order) { in call_callbacks()
141 hdl--; in call_callbacks()
163 for (cnt = PM_CB_ORDER_MAX; cnt > PM_CB_ORDER_DRIVER; cnt--) { in pm_change_state()
164 res = call_callbacks(op, pm_hint, cnt - 1); in pm_change_state()