static int em28xx_dvb_resume(struct em28xx *dev) { int ret = 0; if (dev->is_audio_only) return 0; if (!dev->board.has_dvb) return 0; em28xx_info("Resuming DVB extension"); if (dev->dvb) { struct em28xx_dvb *dvb = dev->dvb; if (dvb->fe[0]) { ret = dvb_frontend_resume(dvb->fe[0]); em28xx_info("fe0 resume %d", ret); } if (dvb->fe[1]) { ret = dvb_frontend_resume(dvb->fe[1]); em28xx_info("fe1 resume %d", ret); } } return 0; }
static int dvb_usbv2_resume_common(struct dvb_usb_device *d) { int ret = 0, i, active_fe; struct dvb_frontend *fe; dev_dbg(&d->udev->dev, "%s:\n", __func__); for (i = 0; i < MAX_NO_OF_ADAPTER_PER_DEVICE; i++) { active_fe = d->adapter[i].active_fe; if (d->adapter[i].dvb_adap.priv && active_fe != -1) { fe = d->adapter[i].fe[active_fe]; ret = dvb_frontend_resume(fe); /* resume usb streaming */ usb_urb_submitv2(&d->adapter[i].stream, NULL); if (d->props->streaming_ctrl) d->props->streaming_ctrl(fe, 1); d->adapter[i].suspend_resume_active = false; } } /* start remote controller poll */ if (d->rc_polling_active) schedule_delayed_work(&d->rc_query_work, msecs_to_jiffies(d->rc.interval)); return ret; }
static int em28xx_dvb_resume(struct em28xx *dev) { int ret = 0; if (dev->is_audio_only) return 0; if (!dev->board.has_dvb) return 0; em28xx_info("Resuming DVB extension"); if (dev->dvb) { struct em28xx_dvb *dvb = dev->dvb; struct i2c_client *client = dvb->i2c_client_tuner; if (dvb->fe[0]) { ret = dvb_frontend_resume(dvb->fe[0]); em28xx_info("fe0 resume %d", ret); } if (dvb->fe[1]) { ret = dvb_frontend_resume(dvb->fe[1]); em28xx_info("fe1 resume %d", ret); } /* remove I2C tuner */ if (client) { module_put(client->dev.driver->owner); i2c_unregister_device(client); } /* remove I2C demod */ client = dvb->i2c_client_demod; if (client) { module_put(client->dev.driver->owner); i2c_unregister_device(client); } em28xx_unregister_dvb(dvb); kfree(dvb); dev->dvb = NULL; } return 0; }