Commit 01659f2a authored by Chris Ball's avatar Chris Ball Committed by Mauro Carvalho Chehab

V4L/DVB (6026): Avoid powering up the camera on resume

Signed-off-by: default avatarChris Ball <cjb@laptop.org>
Signed-off-by: default avatarJonathan Corbet <corbet@lwn.net>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@infradead.org>
parent c545d6ad
...@@ -2233,12 +2233,21 @@ static int cafe_pci_resume(struct pci_dev *pdev) ...@@ -2233,12 +2233,21 @@ static int cafe_pci_resume(struct pci_dev *pdev)
if (ret) if (ret)
return ret; return ret;
ret = pci_enable_device(pdev); ret = pci_enable_device(pdev);
if (ret) { if (ret) {
cam_warn(cam, "Unable to re-enable device on resume!\n"); cam_warn(cam, "Unable to re-enable device on resume!\n");
return ret; return ret;
} }
cafe_ctlr_init(cam); cafe_ctlr_init(cam);
cafe_ctlr_power_down(cam);
mutex_lock(&cam->s_mutex);
if (cam->users > 0) {
cafe_ctlr_power_up(cam); cafe_ctlr_power_up(cam);
__cafe_cam_reset(cam);
}
mutex_unlock(&cam->s_mutex);
set_bit(CF_CONFIG_NEEDED, &cam->flags); set_bit(CF_CONFIG_NEEDED, &cam->flags);
if (cam->state == S_SPECREAD) if (cam->state == S_SPECREAD)
cam->state = S_IDLE; /* Don't bother restarting */ cam->state = S_IDLE; /* Don't bother restarting */
......
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