Before suspending, we should be stoping streaming, as it
makes no sense to deliver pending URBs after resume. Also,
we need to properly reinitialize the streaming after resume,
otherwise if suspend happens while streaming, it won't be
returning back.

Signed-off-by: Mauro Carvalho Chehab <mche...@osg.samsung.com>

diff --git a/drivers/media/usb/em28xx/em28xx-dvb.c 
b/drivers/media/usb/em28xx/em28xx-dvb.c
index 65a456d2f454..3d19607bd8f0 100644
--- a/drivers/media/usb/em28xx/em28xx-dvb.c
+++ b/drivers/media/usb/em28xx/em28xx-dvb.c
@@ -1719,6 +1719,9 @@ static int em28xx_dvb_suspend(struct em28xx *dev)
        if (dev->dvb) {
                struct em28xx_dvb *dvb = dev->dvb;
 
+               if (dvb->nfeeds)
+                       em28xx_stop_streaming(dvb);
+
                if (dvb->fe[0]) {
                        ret = dvb_frontend_suspend(dvb->fe[0]);
                        em28xx_info("fe0 suspend %d", ret);
@@ -1755,6 +1758,9 @@ static int em28xx_dvb_resume(struct em28xx *dev)
                        ret = dvb_frontend_resume(dvb->fe[1]);
                        em28xx_info("fe1 resume %d", ret);
                }
+
+               if (dvb->nfeeds)
+                       em28xx_start_streaming(dvb);
        }
 
        return 0;
-- 
1.9.3

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to