aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/em28xx/em28xx-dvb.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2008-11-27 09:10:40 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-12-29 17:53:43 -0200
commit2fe3e2ee72ef17daad1d3769321bb7dd69a003a9 (patch)
tree1d2e7a225417759a5ad55408d76416af5e7e6eb8 /drivers/media/video/em28xx/em28xx-dvb.c
parentf502e861849ade3a128964410c87acedf437a6a1 (diff)
downloadkernel_samsung_smdk4412-2fe3e2ee72ef17daad1d3769321bb7dd69a003a9.zip
kernel_samsung_smdk4412-2fe3e2ee72ef17daad1d3769321bb7dd69a003a9.tar.gz
kernel_samsung_smdk4412-2fe3e2ee72ef17daad1d3769321bb7dd69a003a9.tar.bz2
V4L/DVB (9764): em28xx: Add support for suspend the device when not used
Several chips may be turned off when the device is not used, like audio, video and dvb demods. This patch adds a gpio callback at the core structs to allow turning off such devices. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/em28xx/em28xx-dvb.c')
-rw-r--r--drivers/media/video/em28xx/em28xx-dvb.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/media/video/em28xx/em28xx-dvb.c b/drivers/media/video/em28xx/em28xx-dvb.c
index 09c15cc..211156d 100644
--- a/drivers/media/video/em28xx/em28xx-dvb.c
+++ b/drivers/media/video/em28xx/em28xx-dvb.c
@@ -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);
}
/* ------------------------------------------------------------------ */
@@ -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;