Skip to content

Commit

Permalink
V4L/DVB (6026): Avoid powering up the camera on resume
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Ball <cjb@laptop.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
  • Loading branch information
Chris Ball authored and Mauro Carvalho Chehab committed Aug 20, 2007
1 parent c545d6a commit 01659f2
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion drivers/media/video/cafe_ccic.c
Original file line number Diff line number Diff line change
Expand Up @@ -2233,12 +2233,21 @@ static int cafe_pci_resume(struct pci_dev *pdev)
if (ret)
return ret;
ret = pci_enable_device(pdev);

if (ret) {
cam_warn(cam, "Unable to re-enable device on resume!\n");
return ret;
}
cafe_ctlr_init(cam);
cafe_ctlr_power_up(cam);
cafe_ctlr_power_down(cam);

mutex_lock(&cam->s_mutex);
if (cam->users > 0) {
cafe_ctlr_power_up(cam);
__cafe_cam_reset(cam);
}
mutex_unlock(&cam->s_mutex);

set_bit(CF_CONFIG_NEEDED, &cam->flags);
if (cam->state == S_SPECREAD)
cam->state = S_IDLE; /* Don't bother restarting */
Expand Down

0 comments on commit 01659f2

Please sign in to comment.