Skip to content

Commit

Permalink
V4L/DVB (6394): Fix a cafe_ccic resume bug
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jonathan Corbet authored and Mauro Carvalho Chehab committed Nov 4, 2007
1 parent a8ab68b commit c303449
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/media/video/cafe_ccic.c
Original file line number Diff line number Diff line change
Expand Up @@ -2232,13 +2232,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;
}

Expand Down

0 comments on commit c303449

Please sign in to comment.