static int bridge_resume(struct usb_interface *iface) { int retval = 0; struct data_bridge *dev = usb_get_intfdata(iface); clear_bit(SUSPENDED, &dev->flags); if (dev->brdg || is_bridge_open()) queue_work(dev->wq, &dev->process_rx_w); retval = ctrl_bridge_resume(dev->id); return retval; }
static int bridge_resume(struct usb_interface *iface) { int retval = 0; int oldstate; struct data_bridge *dev = usb_get_intfdata(iface); oldstate = iface->dev.power.power_state.event; iface->dev.power.power_state.event = PM_EVENT_ON; if (oldstate & PM_EVENT_SUSPEND) { retval = data_bridge_resume(dev); if (!retval) retval = ctrl_bridge_resume(dev->id); } return retval; }