static void runtime_resume(struct device * dev) { dev_dbg(dev, "resuming\n"); if (!dev->power.power_state.event) return; if (!resume_device(dev)) dev->power.power_state = PMSG_ON; }
void dpm_power_up(void) { while(!list_empty(&dpm_off_irq)) { struct list_head * entry = dpm_off_irq.next; struct device * dev = to_device(entry); get_device(dev); list_del_init(entry); list_add_tail(entry, &dpm_active); resume_device(dev); put_device(dev); } }
int resume_devices_rooted(struct device *root, pm_message_t state) { struct klist_iter i; struct device *child; int error =0; error = resume_device(root, state); if(error) return error; if (!root->p) return 0; klist_iter_init(&root->p->klist_children, &i); while ((child = next_device(&i)) && !error) error = resume_devices_rooted(child, state); klist_iter_exit(&i); return error; }
void dpm_resume(void) { down(&dpm_list_sem); while(!list_empty(&dpm_off)) { struct list_head * entry = dpm_off.next; struct device * dev = to_device(entry); get_device(dev); list_del_init(entry); list_add_tail(entry, &dpm_active); up(&dpm_list_sem); if (!dev->power.prev_state.event) resume_device(dev); down(&dpm_list_sem); put_device(dev); } up(&dpm_list_sem); }
static void runtime_resume(struct device * dev) { if (!dev->power.power_state) return; resume_device(dev); }