From patchwork Sat Oct 3 14:59:17 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?TsOpbWV0aCBNw6FydG9u?= X-Patchwork-Id: 1803 Return-path: Envelope-to: mchehab@infradead.org Delivery-date: Sat, 03 Oct 2009 15:01:10 +0000 Received: from bombadil.infradead.org [18.85.46.34] by pedra.chehab.org with IMAP (fetchmail-6.3.6) for (single-drop); Sat, 03 Oct 2009 18:17:33 -0300 (BRT) Received: from vger.kernel.org ([209.132.176.167]) by bombadil.infradead.org with esmtp (Exim 4.69 #1 (Red Hat Linux)) id 1Mu66f-0006FQ-Qw; Sat, 03 Oct 2009 15:01:10 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755658AbZJCO76 (ORCPT + 1 other); Sat, 3 Oct 2009 10:59:58 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755931AbZJCO76 (ORCPT ); Sat, 3 Oct 2009 10:59:58 -0400 Received: from mail01d.mail.t-online.hu ([84.2.42.6]:60940 "EHLO mail01d.mail.t-online.hu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755653AbZJCO75 (ORCPT ); Sat, 3 Oct 2009 10:59:57 -0400 X-Authuid: nmarci Received: from [192.168.1.64] (dsl54029FEE.pool.t-online.hu [84.2.159.238]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail01d.mail.t-online.hu (Postfix) with ESMTPSA id A7B7D7589B5; Sat, 3 Oct 2009 16:54:58 +0200 (CEST) Message-ID: <4AC766C5.3040001@freemail.hu> Date: Sat, 03 Oct 2009 16:59:17 +0200 From: =?ISO-8859-2?Q?N=E9meth_M=E1rton?= User-Agent: Mozilla/5.0 (X11; U; Linux i686; hu-HU; rv:1.8.1.21) Gecko/20090402 SeaMonkey/1.1.16 MIME-Version: 1.0 To: Jean-Francois Moine , Thomas Kaiser , V4L Mailing List Subject: [PATCH] pac7311: remove redundant register page switching X-DCC-mail.t-online.hu-Metrics: mail01d.mail.t-online.hu 32721; Body=3 Fuz1=3 Fuz2=3 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Hi, do you know any reason (i.e. a special device needs this) why switch to register page 0 is done twice in the setcolors() function of pac7311? I removed the redundant page switch and my Labtec Webcam 2200 still behaves correctly when I change the "Saturation" control. Regards, Márton Németh --- From: Márton Németh Remove redundant register page switching to page 0 when changing the color control. The change was tested with Labtec Webcam 2200 (USB ID: 093a:2626). Signed-off-by: Márton Németh --- -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff -upr d/drivers/media/video/gspca/pac7311.c e/drivers/media/video/gspca/pac7311.c --- d/drivers/media/video/gspca/pac7311.c 2009-10-03 09:02:31.000000000 +0200 +++ e/drivers/media/video/gspca/pac7311.c 2009-10-03 16:23:37.000000000 +0200 @@ -579,7 +579,6 @@ static void setcolors(struct gspca_dev * reg_w(gspca_dev, 0xff, 0x03); /* page 3 */ reg_w(gspca_dev, 0x11, 0x01); reg_w(gspca_dev, 0xff, 0x00); /* page 0 */ - reg_w(gspca_dev, 0xff, 0x00); /* page 0 */ for (i = 0; i < 9; i++) { v = a[i] * sd->colors / COLOR_MAX + b[i]; reg_w(gspca_dev, 0x0f + 2 * i, (v >> 8) & 0x07);