Commit c3034497 authored by Jonathan Corbet's avatar Jonathan Corbet Committed by Mauro Carvalho Chehab

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: default avatarJonathan Corbet <corbet@lwn.net>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@infradead.org>
parent a8ab68bf
...@@ -2232,13 +2232,16 @@ static int cafe_pci_suspend(struct pci_dev *pdev, pm_message_t state) ...@@ -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); struct cafe_camera *cam = cafe_find_by_pdev(pdev);
int ret; int ret;
enum cafe_state cstate;
ret = pci_save_state(pdev); ret = pci_save_state(pdev);
if (ret) if (ret)
return ret; return ret;
cstate = cam->state; /* HACK - stop_dma sets to idle */
cafe_ctlr_stop_dma(cam); cafe_ctlr_stop_dma(cam);
cafe_ctlr_power_down(cam); cafe_ctlr_power_down(cam);
pci_disable_device(pdev); pci_disable_device(pdev);
cam->state = cstate;
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment