Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=01659f2a0067d855089811529fa596cbc40f1e75
Commit:     01659f2a0067d855089811529fa596cbc40f1e75
Parent:     c545d6adbcacd296f7457bd992556feb055379de
Author:     Chris Ball <[EMAIL PROTECTED]>
AuthorDate: Fri Aug 17 01:01:33 2007 -0300
Committer:  Mauro Carvalho Chehab <[EMAIL PROTECTED]>
CommitDate: Mon Aug 20 12:18:04 2007 -0300

    V4L/DVB (6026): Avoid powering up the camera on resume
    
    Signed-off-by: Chris Ball <[EMAIL PROTECTED]>
    Signed-off-by: Jonathan Corbet <[EMAIL PROTECTED]>
    Signed-off-by: Mauro Carvalho Chehab <[EMAIL PROTECTED]>
---
 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 c08f650..8809010 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)
        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 */
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to