From patchwork Sat Oct 3 07:35:33 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?TsODwqltZXRoIE3Dg8KhcnRvbg==?= X-Patchwork-Id: 51508 X-Patchwork-Delegate: dougsland@redhat.com Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n937aZeF027591 for ; Sat, 3 Oct 2009 07:36:36 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753422AbZJCHfe (ORCPT ); Sat, 3 Oct 2009 03:35:34 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752868AbZJCHfe (ORCPT ); Sat, 3 Oct 2009 03:35:34 -0400 Received: from mail00a.mail.t-online.hu ([84.2.40.5]:54219 "EHLO mail00a.mail.t-online.hu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751417AbZJCHfd (ORCPT ); Sat, 3 Oct 2009 03:35:33 -0400 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 mail00a.mail.t-online.hu (Postfix) with ESMTPSA id 27ACE2AF4B9; Sat, 3 Oct 2009 09:32:04 +0200 (CEST) Message-ID: <4AC6FEC5.4000808@freemail.hu> Date: Sat, 03 Oct 2009 09:35:33 +0200 From: =?UTF-8?B?TsOpbWV0aCBNw6FydG9u?= 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 CC: V4L Mailing List , LKML Subject: [PATCH 1/3] pac7311: remove magic value for SKIP X-DCC-mail.t-online.hu-Metrics: mail00a.mail.t-online.hu 32710; Body=4 Fuz1=4 Fuz2=4 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org diff -upr a/drivers/media/video/gspca/pac7311.c b/drivers/media/video/gspca/pac7311.c --- a/drivers/media/video/gspca/pac7311.c 2009-09-28 17:40:19.000000000 +0200 +++ b/drivers/media/video/gspca/pac7311.c 2009-10-03 08:27:36.000000000 +0200 @@ -316,7 +316,8 @@ static const __u8 start_7302[] = { 0, 0 /* end of sequence */ }; -/* page 3 - the value 0xaa says skip the index - see reg_w_page() */ +#define SKIP 0xaa +/* page 3 - the value SKIP says skip the index - see reg_w_page() */ static const __u8 page3_7302[] = { 0x90, 0x40, 0x03, 0x50, 0xc2, 0x01, 0x14, 0x16, 0x14, 0x12, 0x00, 0x00, 0x00, 0x02, 0x33, 0x00, @@ -383,13 +384,13 @@ static const __u8 start_7311[] = { 0, 0 /* end of sequence */ }; -/* page 4 - the value 0xaa says skip the index - see reg_w_page() */ +/* page 4 - the value SKIP says skip the index - see reg_w_page() */ static const __u8 page4_7311[] = { - 0xaa, 0xaa, 0x04, 0x54, 0x07, 0x2b, 0x09, 0x0f, - 0x09, 0x00, 0xaa, 0xaa, 0x07, 0x00, 0x00, 0x62, - 0x08, 0xaa, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x03, 0xa0, 0x01, 0xf4, 0xaa, - 0xaa, 0x00, 0x08, 0xaa, 0x03, 0xaa, 0x00, 0x68, + SKIP, SKIP, 0x04, 0x54, 0x07, 0x2b, 0x09, 0x0f, + 0x09, 0x00, SKIP, SKIP, 0x07, 0x00, 0x00, 0x62, + 0x08, SKIP, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x03, 0xa0, 0x01, 0xf4, SKIP, + SKIP, 0x00, 0x08, SKIP, 0x03, SKIP, 0x00, 0x68, 0xca, 0x10, 0x06, 0x78, 0x00, 0x00, 0x00, 0x00, 0x23, 0x28, 0x04, 0x11, 0x00, 0x00 }; @@ -438,7 +439,7 @@ static void reg_w_page(struct gspca_dev int index; for (index = 0; index < len; index++) { - if (page[index] == 0xaa) /* skip this index */ + if (page[index] == SKIP) /* skip this index */ continue; gspca_dev->usb_buf[0] = page[index]; usb_control_msg(gspca_dev->dev,