aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/video/cafe_ccic.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/media/video/cafe_ccic.c b/drivers/media/video/cafe_ccic.c
index c08f650df423..88090107cd44 100644
--- a/drivers/media/video/cafe_ccic.c
+++ b/drivers/media/video/cafe_ccic.c
@@ -2233,12 +2233,21 @@ static int cafe_pci_resume(struct pci_dev *pdev)
2233 if (ret) 2233 if (ret)
2234 return ret; 2234 return ret;
2235 ret = pci_enable_device(pdev); 2235 ret = pci_enable_device(pdev);
2236
2236 if (ret) { 2237 if (ret) {
2237 cam_warn(cam, "Unable to re-enable device on resume!\n"); 2238 cam_warn(cam, "Unable to re-enable device on resume!\n");
2238 return ret; 2239 return ret;
2239 } 2240 }
2240 cafe_ctlr_init(cam); 2241 cafe_ctlr_init(cam);
2241 cafe_ctlr_power_up(cam); 2242 cafe_ctlr_power_down(cam);
2243
2244 mutex_lock(&cam->s_mutex);
2245 if (cam->users > 0) {
2246 cafe_ctlr_power_up(cam);
2247 __cafe_cam_reset(cam);
2248 }
2249 mutex_unlock(&cam->s_mutex);
2250
2242 set_bit(CF_CONFIG_NEEDED, &cam->flags); 2251 set_bit(CF_CONFIG_NEEDED, &cam->flags);
2243 if (cam->state == S_SPECREAD) 2252 if (cam->state == S_SPECREAD)
2244 cam->state = S_IDLE; /* Don't bother restarting */ 2253 cam->state = S_IDLE; /* Don't bother restarting */