aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorMarton Nemeth <nm127@freemail.hu>2009-10-04 12:51:26 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-12-05 15:40:25 -0500
commitff75e99c62bcef8ccd6fb70151ad2b87aa52a165 (patch)
tree4e9425fe319b6a7a9179e8412e2b31c734f3cf74 /drivers/media
parent518c8df77c21b7d1690dd8b96eb0e54c4ec1c9c1 (diff)
V4L/DVB (13117): gspca - pac7311: remove magic value for SKIP.
Change the magic value 0xaa to SKIP for better understandability. Signed-off-by: Marton Nemeth <nm127@freemail.hu> Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/video/gspca/pac7311.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/drivers/media/video/gspca/pac7311.c b/drivers/media/video/gspca/pac7311.c
index 052714484e83..f05bc800a7cb 100644
--- a/drivers/media/video/gspca/pac7311.c
+++ b/drivers/media/video/gspca/pac7311.c
@@ -316,7 +316,8 @@ static const __u8 start_7302[] = {
316 0, 0 /* end of sequence */ 316 0, 0 /* end of sequence */
317}; 317};
318 318
319/* page 3 - the value 0xaa says skip the index - see reg_w_page() */ 319#define SKIP 0xaa
320/* page 3 - the value SKIP says skip the index - see reg_w_page() */
320static const __u8 page3_7302[] = { 321static const __u8 page3_7302[] = {
321 0x90, 0x40, 0x03, 0x50, 0xc2, 0x01, 0x14, 0x16, 322 0x90, 0x40, 0x03, 0x50, 0xc2, 0x01, 0x14, 0x16,
322 0x14, 0x12, 0x00, 0x00, 0x00, 0x02, 0x33, 0x00, 323 0x14, 0x12, 0x00, 0x00, 0x00, 0x02, 0x33, 0x00,
@@ -383,13 +384,13 @@ static const __u8 start_7311[] = {
383 0, 0 /* end of sequence */ 384 0, 0 /* end of sequence */
384}; 385};
385 386
386/* page 4 - the value 0xaa says skip the index - see reg_w_page() */ 387/* page 4 - the value SKIP says skip the index - see reg_w_page() */
387static const __u8 page4_7311[] = { 388static const __u8 page4_7311[] = {
388 0xaa, 0xaa, 0x04, 0x54, 0x07, 0x2b, 0x09, 0x0f, 389 SKIP, SKIP, 0x04, 0x54, 0x07, 0x2b, 0x09, 0x0f,
389 0x09, 0x00, 0xaa, 0xaa, 0x07, 0x00, 0x00, 0x62, 390 0x09, 0x00, SKIP, SKIP, 0x07, 0x00, 0x00, 0x62,
390 0x08, 0xaa, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 391 0x08, SKIP, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00,
391 0x00, 0x00, 0x00, 0x03, 0xa0, 0x01, 0xf4, 0xaa, 392 0x00, 0x00, 0x00, 0x03, 0xa0, 0x01, 0xf4, SKIP,
392 0xaa, 0x00, 0x08, 0xaa, 0x03, 0xaa, 0x00, 0x68, 393 SKIP, 0x00, 0x08, SKIP, 0x03, SKIP, 0x00, 0x68,
393 0xca, 0x10, 0x06, 0x78, 0x00, 0x00, 0x00, 0x00, 394 0xca, 0x10, 0x06, 0x78, 0x00, 0x00, 0x00, 0x00,
394 0x23, 0x28, 0x04, 0x11, 0x00, 0x00 395 0x23, 0x28, 0x04, 0x11, 0x00, 0x00
395}; 396};
@@ -438,7 +439,7 @@ static void reg_w_page(struct gspca_dev *gspca_dev,
438 int index; 439 int index;
439 440
440 for (index = 0; index < len; index++) { 441 for (index = 0; index < len; index++) {
441 if (page[index] == 0xaa) /* skip this index */ 442 if (page[index] == SKIP) /* skip this index */
442 continue; 443 continue;
443 gspca_dev->usb_buf[0] = page[index]; 444 gspca_dev->usb_buf[0] = page[index];
444 usb_control_msg(gspca_dev->dev, 445 usb_control_msg(gspca_dev->dev,