diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-10-23 14:30:27 -0600 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-10-23 14:30:27 -0600 |
commit | b280bfddc08e110a33667a175bb280d77701873b (patch) | |
tree | 2f032db0a9a7eccf49c0c2eb5f0149c8136244ae /linux/drivers/media/video | |
parent | ac7f0711100c91e1a60ca431ee0af689a8d7764b (diff) | |
download | mediapointer-dvb-s2-b280bfddc08e110a33667a175bb280d77701873b.tar.gz mediapointer-dvb-s2-b280bfddc08e110a33667a175bb280d77701873b.tar.bz2 |
Fix a cafe_ccic resume bug
From: Jonathan Corbet <corbet@lwn.net>
If the system is suspended while the camera is streaming, it will not
continue streaming on resume. Save the state properly so that resume
works.
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux/drivers/media/video')
-rw-r--r-- | linux/drivers/media/video/cafe_ccic.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/linux/drivers/media/video/cafe_ccic.c b/linux/drivers/media/video/cafe_ccic.c index aed6ab229..c9bcfedf0 100644 --- a/linux/drivers/media/video/cafe_ccic.c +++ b/linux/drivers/media/video/cafe_ccic.c @@ -2239,13 +2239,16 @@ static int cafe_pci_suspend(struct pci_dev *pdev, pm_message_t state) { struct cafe_camera *cam = cafe_find_by_pdev(pdev); int ret; + enum cafe_state cstate; ret = pci_save_state(pdev); if (ret) return ret; + cstate = cam->state; /* HACK - stop_dma sets to idle */ cafe_ctlr_stop_dma(cam); cafe_ctlr_power_down(cam); pci_disable_device(pdev); + cam->state = cstate; return 0; } |