diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-09-05 17:29:50 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-09-05 17:29:50 -0400 |
commit | 14408c4f4172eafc26ff52bebb7a8ab85b1c5492 (patch) | |
tree | 64b9310e8f704c54e3a1cbe48b9b21c5f85dff0b /drivers/media/video/cx18/cx18-av-firmware.c | |
parent | 54e2a3270f4d5f50aefb08630a3c3c758b9c2723 (diff) | |
parent | 8561098ff11d21f1a6a9a01fae2e68653928dbb5 (diff) |
Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb
* 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/v4l-dvb: (98 commits)
V4L/DVB (8881): gspca: After 'while (retry--) {...}', retry will be -1 but not 0.
V4L/DVB (8880): PATCH: Fix parents on some webcam drivers
V4L/DVB (8877): b2c2 and bt8xx: udelay to mdelay
V4L/DVB (8876): budget: udelay changed to mdelay
V4L/DVB (8874): gspca: Adjust hstart for sn9c103/ov7630 and update usb-id's.
V4L/DVB (8873): gspca: Bad image offset with rev012a of spca561 and adjust exposure.
V4L/DVB (8872): gspca: Bad image format and offset with rev072a of spca561.
V4L/DVB (8870): gspca: Fix dark room problem with sonixb.
V4L/DVB (8869): gspca: Move the Sonix webcams with TAS5110C1B from sn9c102 to gspca.
V4L/DVB (8868): gspca: Support for vga modes with sif sensors in sonixb.
V4L/DVB (8844): dabusb_fpga_download(): fix a memory leak
V4L/DVB (8843): tda10048_firmware_upload(): fix a memory leak
V4L/DVB (8842): vivi_release(): fix use-after-free
V4L/DVB (8840): dib0700: add basic support for Hauppauge Nova-TD-500 (84xxx)
V4L/DVB (8839): dib0700: add comment to identify 35th USB id pair
V4L/DVB (8837): dvb: fix I2C adapters name size
V4L/DVB (8835): gspca: Same pixfmt as the sn9c102 driver and raw Bayer added in sonixb.
V4L/DVB (8834): gspca: Have a bigger buffer for sn9c10x compressed images.
V4L/DVB (8833): gspca: Cleanup the sonixb code.
V4L/DVB (8832): gspca: Bad pixelformat of vc0321 webcams.
...
Diffstat (limited to 'drivers/media/video/cx18/cx18-av-firmware.c')
-rw-r--r-- | drivers/media/video/cx18/cx18-av-firmware.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/media/video/cx18/cx18-av-firmware.c b/drivers/media/video/cx18/cx18-av-firmware.c index 834b9248242e..e996a4e3123a 100644 --- a/drivers/media/video/cx18/cx18-av-firmware.c +++ b/drivers/media/video/cx18/cx18-av-firmware.c | |||
@@ -32,7 +32,7 @@ int cx18_av_loadfw(struct cx18 *cx) | |||
32 | u32 v; | 32 | u32 v; |
33 | const u8 *ptr; | 33 | const u8 *ptr; |
34 | int i; | 34 | int i; |
35 | int retries = 0; | 35 | int retries1 = 0; |
36 | 36 | ||
37 | if (request_firmware(&fw, FWFILE, &cx->dev->dev) != 0) { | 37 | if (request_firmware(&fw, FWFILE, &cx->dev->dev) != 0) { |
38 | CX18_ERR("unable to open firmware %s\n", FWFILE); | 38 | CX18_ERR("unable to open firmware %s\n", FWFILE); |
@@ -41,7 +41,7 @@ int cx18_av_loadfw(struct cx18 *cx) | |||
41 | 41 | ||
42 | /* The firmware load often has byte errors, so allow for several | 42 | /* The firmware load often has byte errors, so allow for several |
43 | retries, both at byte level and at the firmware load level. */ | 43 | retries, both at byte level and at the firmware load level. */ |
44 | while (retries < 5) { | 44 | while (retries1 < 5) { |
45 | cx18_av_write4(cx, CXADEC_CHIP_CTRL, 0x00010000); | 45 | cx18_av_write4(cx, CXADEC_CHIP_CTRL, 0x00010000); |
46 | cx18_av_write(cx, CXADEC_STD_DET_CTL, 0xf6); | 46 | cx18_av_write(cx, CXADEC_STD_DET_CTL, 0xf6); |
47 | 47 | ||
@@ -57,9 +57,9 @@ int cx18_av_loadfw(struct cx18 *cx) | |||
57 | for (i = 0; i < size; i++) { | 57 | for (i = 0; i < size; i++) { |
58 | u32 dl_control = 0x0F000000 | i | ((u32)ptr[i] << 16); | 58 | u32 dl_control = 0x0F000000 | i | ((u32)ptr[i] << 16); |
59 | u32 value = 0; | 59 | u32 value = 0; |
60 | int retries; | 60 | int retries2; |
61 | 61 | ||
62 | for (retries = 0; retries < 5; retries++) { | 62 | for (retries2 = 0; retries2 < 5; retries2++) { |
63 | cx18_av_write4(cx, CXADEC_DL_CTL, dl_control); | 63 | cx18_av_write4(cx, CXADEC_DL_CTL, dl_control); |
64 | udelay(10); | 64 | udelay(10); |
65 | value = cx18_av_read4(cx, CXADEC_DL_CTL); | 65 | value = cx18_av_read4(cx, CXADEC_DL_CTL); |
@@ -69,18 +69,18 @@ int cx18_av_loadfw(struct cx18 *cx) | |||
69 | the address. We can only write the lower | 69 | the address. We can only write the lower |
70 | address byte of the address. */ | 70 | address byte of the address. */ |
71 | if ((value & 0x3F00) != (dl_control & 0x3F00)) { | 71 | if ((value & 0x3F00) != (dl_control & 0x3F00)) { |
72 | retries = 5; | 72 | retries2 = 5; |
73 | break; | 73 | break; |
74 | } | 74 | } |
75 | } | 75 | } |
76 | if (retries >= 5) | 76 | if (retries2 >= 5) |
77 | break; | 77 | break; |
78 | } | 78 | } |
79 | if (i == size) | 79 | if (i == size) |
80 | break; | 80 | break; |
81 | retries++; | 81 | retries1++; |
82 | } | 82 | } |
83 | if (retries >= 5) { | 83 | if (retries1 >= 5) { |
84 | CX18_ERR("unable to load firmware %s\n", FWFILE); | 84 | CX18_ERR("unable to load firmware %s\n", FWFILE); |
85 | release_firmware(fw); | 85 | release_firmware(fw); |
86 | return -EIO; | 86 | return -EIO; |