diff options
author | Chris Ball <cjb@laptop.org> | 2007-08-17 00:01:33 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-08-20 11:18:04 -0400 |
commit | 01659f2a0067d855089811529fa596cbc40f1e75 (patch) | |
tree | 9831f561abd58ef8cf8645e6840c9ad9ef784196 /drivers/media/video/cafe_ccic.c | |
parent | c545d6adbcacd296f7457bd992556feb055379de (diff) |
V4L/DVB (6026): Avoid powering up the camera on resume
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>
Diffstat (limited to 'drivers/media/video/cafe_ccic.c')
-rw-r--r-- | drivers/media/video/cafe_ccic.c | 11 |
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 */ |