diff options
author | Jonathan Corbet <corbet@lwn.net> | 2007-10-23 16:30:27 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-11-04 18:41:18 -0500 |
commit | c303449741279fc9a108c80e0816f0c4ddca8c09 (patch) | |
tree | 4d204da54708e925f38c00bba290ef19756d3cc9 /drivers | |
parent | a8ab68bffe3fe7b8e9ff963ea321d283fc77ac5f (diff) |
V4L/DVB (6394): Fix a cafe_ccic resume bug
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 'drivers')
-rw-r--r-- | drivers/media/video/cafe_ccic.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/media/video/cafe_ccic.c b/drivers/media/video/cafe_ccic.c index b63cab336920..2567da7b09eb 100644 --- a/drivers/media/video/cafe_ccic.c +++ b/drivers/media/video/cafe_ccic.c | |||
@@ -2232,13 +2232,16 @@ static int cafe_pci_suspend(struct pci_dev *pdev, pm_message_t state) | |||
2232 | { | 2232 | { |
2233 | struct cafe_camera *cam = cafe_find_by_pdev(pdev); | 2233 | struct cafe_camera *cam = cafe_find_by_pdev(pdev); |
2234 | int ret; | 2234 | int ret; |
2235 | enum cafe_state cstate; | ||
2235 | 2236 | ||
2236 | ret = pci_save_state(pdev); | 2237 | ret = pci_save_state(pdev); |
2237 | if (ret) | 2238 | if (ret) |
2238 | return ret; | 2239 | return ret; |
2240 | cstate = cam->state; /* HACK - stop_dma sets to idle */ | ||
2239 | cafe_ctlr_stop_dma(cam); | 2241 | cafe_ctlr_stop_dma(cam); |
2240 | cafe_ctlr_power_down(cam); | 2242 | cafe_ctlr_power_down(cam); |
2241 | pci_disable_device(pdev); | 2243 | pci_disable_device(pdev); |
2244 | cam->state = cstate; | ||
2242 | return 0; | 2245 | return 0; |
2243 | } | 2246 | } |
2244 | 2247 | ||