Lines Matching defs:handler
102 * acpi_register_wakeup_handler - Register wakeup handler
104 * @wakeup: Wakeup-handler to call when the SCI has triggered a wakeup
105 * @context: Context to pass to the handler when calling it
108 * a handler which returns true when the device they are managing wants
114 struct acpi_wakeup_handler *handler;
118 * need to register the handler.
123 handler = kmalloc(sizeof(*handler), GFP_KERNEL);
124 if (!handler)
127 handler->wakeup = wakeup;
128 handler->context = context;
131 list_add(&handler->list_node, &acpi_wakeup_handler_head);
139 * acpi_unregister_wakeup_handler - Unregister wakeup handler
140 * @wakeup: Wakeup-handler passed to acpi_register_wakeup_handler()
146 struct acpi_wakeup_handler *handler;
149 list_for_each_entry(handler, &acpi_wakeup_handler_head, list_node) {
150 if (handler->wakeup == wakeup && handler->context == context) {
151 list_del(&handler->list_node);
152 kfree(handler);
162 struct acpi_wakeup_handler *handler;
165 list_for_each_entry(handler, &acpi_wakeup_handler_head, list_node) {
166 if (handler->wakeup(handler->context))