]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - drivers/media/video/em28xx/em28xx-dvb.c
V4L/DVB (9764): em28xx: Add support for suspend the device when not used
[mirror_ubuntu-artful-kernel.git] / drivers / media / video / em28xx / em28xx-dvb.c
index c99e2383b7ec994cf92532bd2135812ecdda822d..211156d458f0de94622bb7acd093895bfb577899 100644 (file)
@@ -161,7 +161,7 @@ static int stop_streaming(struct em28xx_dvb *dvb)
 
        em28xx_uninit_isoc(dev);
 
-       em28xx_set_mode(dev, EM28XX_MODE_UNDEFINED);
+       em28xx_set_mode(dev, EM28XX_SUSPEND);
 
        return 0;
 }
@@ -215,7 +215,7 @@ static int em28xx_dvb_bus_ctrl(struct dvb_frontend *fe, int acquire)
        if (acquire)
                return em28xx_set_mode(dev, EM28XX_DIGITAL_MODE);
        else
-               return em28xx_set_mode(dev, EM28XX_MODE_UNDEFINED);
+               return em28xx_set_mode(dev, EM28XX_SUSPEND);
 }
 
 /* ------------------------------------------------------------------ */
@@ -393,7 +393,7 @@ static int dvb_init(struct em28xx *dev)
        int result = 0;
        struct em28xx_dvb *dvb;
 
-       if (!dev->has_dvb) {
+       if (!dev->board.has_dvb) {
                /* This device does not support the extension */
                return 0;
        }
@@ -466,12 +466,12 @@ static int dvb_init(struct em28xx *dev)
        if (result < 0)
                goto out_free;
 
-       em28xx_set_mode(dev, EM28XX_MODE_UNDEFINED);
+       em28xx_set_mode(dev, EM28XX_SUSPEND);
        printk(KERN_INFO "Successfully loaded em28xx-dvb\n");
        return 0;
 
 out_free:
-       em28xx_set_mode(dev, EM28XX_MODE_UNDEFINED);
+       em28xx_set_mode(dev, EM28XX_SUSPEND);
        kfree(dvb);
        dev->dvb = NULL;
        return result;
@@ -479,7 +479,7 @@ out_free:
 
 static int dvb_fini(struct em28xx *dev)
 {
-       if (!dev->has_dvb) {
+       if (!dev->board.has_dvb) {
                /* This device does not support the extension */
                return 0;
        }