From patchwork Sun Aug 4 22:20:27 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonio Ospite X-Patchwork-Id: 2838490 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 9125C9F479 for ; Sun, 4 Aug 2013 22:20:39 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 92C972016A for ; Sun, 4 Aug 2013 22:20:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4468420168 for ; Sun, 4 Aug 2013 22:20:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753949Ab3HDWUf (ORCPT ); Sun, 4 Aug 2013 18:20:35 -0400 Received: from smtp206.alice.it ([82.57.200.102]:39944 "EHLO smtp206.alice.it" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753932Ab3HDWUf (ORCPT ); Sun, 4 Aug 2013 18:20:35 -0400 Received: from jcn (87.3.148.246) by smtp206.alice.it (8.6.060.28) id 51FA3B2F00D24AD1; Mon, 5 Aug 2013 00:20:31 +0200 Received: from ao2 by jcn with local (Exim 4.80) (envelope-from ) id 1V66f7-0003il-Bq; Mon, 05 Aug 2013 00:20:29 +0200 From: Antonio Ospite To: Yaroslav Zakharuk Cc: Antonio Ospite , linux-media@vger.kernel.org, 1173723@bugs.launchpad.net Subject: [PATCH RFC] [media] gspca-ov534: don't call sd_start() from sd_init() Date: Mon, 5 Aug 2013 00:20:27 +0200 Message-Id: <1375654827-14270-1-git-send-email-ospite@studenti.unina.it> X-Mailer: git-send-email 1.8.4.rc1 In-Reply-To: <20130731133634.fbfe99f97026454593d3518f@studenti.unina.it> References: <20130731133634.fbfe99f97026454593d3518f@studenti.unina.it> X-Face: z*RaLf`X<@C75u6Ig9}{oW$H; 1_\2t5)({*|jhM/Vb; ]yA5\I~93>J<_`<4)A{':UrE Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP --- Hi Yaroslav, the patch below should fix the Oops caused by sd_start() called too early, but I am not sure about why sd_start() was called from sd_init() for Hercules webcams in the first place, maybe the snippet marked with: /* (from ms-win trace) */ in sd_start() must be moved to sd_init() too. Let me know if the change below alone is enough and the webcam keeps working, a test with suspend and resume would good to have too. Thanks, Antonio drivers/media/usb/gspca/ov534.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/media/usb/gspca/ov534.c b/drivers/media/usb/gspca/ov534.c index 2e28c81..03a33c4 100644 --- a/drivers/media/usb/gspca/ov534.c +++ b/drivers/media/usb/gspca/ov534.c @@ -1305,8 +1305,7 @@ static int sd_init(struct gspca_dev *gspca_dev) ov534_set_led(gspca_dev, 1); sccb_w_array(gspca_dev, sensor_init[sd->sensor].val, sensor_init[sd->sensor].len); - if (sd->sensor == SENSOR_OV767x) - sd_start(gspca_dev); + sd_stopN(gspca_dev); /* set_frame_rate(gspca_dev); */