aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2009-07-29 07:02:50 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-09-12 11:19:53 -0400
commitc529e556f64951a9d50f39e39c4be04ae43f5499 (patch)
treeae96b8880f1bb901fb163067d4dcdfd7ae524e0b
parent8d81ae243158b0ac8b2c1646d5adcbdf26a260bc (diff)
V4L/DVB (12616): gspca_pac207: remove a number of unneeded (repeated) register writes
gspca_pac207: remove a number of unneeded (repeated) register writes Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r--drivers/media/video/gspca/pac207.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/drivers/media/video/gspca/pac207.c b/drivers/media/video/gspca/pac207.c
index 95a97ab684cd..f20d21b1c7d7 100644
--- a/drivers/media/video/gspca/pac207.c
+++ b/drivers/media/video/gspca/pac207.c
@@ -169,13 +169,9 @@ static const __u8 pac207_sensor_init[][8] = {
169 {0x10, 0x12, 0x0d, 0x12, 0x0c, 0x01, 0x29, 0xf0}, 169 {0x10, 0x12, 0x0d, 0x12, 0x0c, 0x01, 0x29, 0xf0},
170 {0x00, 0x64, 0x64, 0x64, 0x04, 0x10, 0xf0, 0x30}, 170 {0x00, 0x64, 0x64, 0x64, 0x04, 0x10, 0xf0, 0x30},
171 {0x00, 0x00, 0x00, 0x70, 0xa0, 0xf8, 0x00, 0x00}, 171 {0x00, 0x00, 0x00, 0x70, 0xa0, 0xf8, 0x00, 0x00},
172 {0x00, 0x00, 0x32, 0x00, 0x96, 0x00, 0xa2, 0x02},
173 {0x32, 0x00, 0x96, 0x00, 0xA2, 0x02, 0xaf, 0x00}, 172 {0x32, 0x00, 0x96, 0x00, 0xA2, 0x02, 0xaf, 0x00},
174}; 173};
175 174
176 /* 48 reg_72 Rate Control end BalSize_4a =0x36 */
177static const __u8 PacReg72[] = { 0x00, 0x00, 0x36, 0x00 };
178
179static int pac207_write_regs(struct gspca_dev *gspca_dev, u16 index, 175static int pac207_write_regs(struct gspca_dev *gspca_dev, u16 index,
180 const u8 *buffer, u16 length) 176 const u8 *buffer, u16 length)
181{ 177{
@@ -274,7 +270,6 @@ static int sd_init(struct gspca_dev *gspca_dev)
274 * Bit_1=LED, 270 * Bit_1=LED,
275 * Bit_2=Compression test mode enable */ 271 * Bit_2=Compression test mode enable */
276 pac207_write_reg(gspca_dev, 0x0f, 0x00); /* Power Control */ 272 pac207_write_reg(gspca_dev, 0x0f, 0x00); /* Power Control */
277 pac207_write_reg(gspca_dev, 0x11, 0x30); /* Analog Bias */
278 273
279 return 0; 274 return 0;
280} 275}
@@ -289,9 +284,7 @@ static int sd_start(struct gspca_dev *gspca_dev)
289 pac207_write_regs(gspca_dev, 0x0002, pac207_sensor_init[0], 8); 284 pac207_write_regs(gspca_dev, 0x0002, pac207_sensor_init[0], 8);
290 pac207_write_regs(gspca_dev, 0x000a, pac207_sensor_init[1], 8); 285 pac207_write_regs(gspca_dev, 0x000a, pac207_sensor_init[1], 8);
291 pac207_write_regs(gspca_dev, 0x0012, pac207_sensor_init[2], 8); 286 pac207_write_regs(gspca_dev, 0x0012, pac207_sensor_init[2], 8);
292 pac207_write_regs(gspca_dev, 0x0040, pac207_sensor_init[3], 8); 287 pac207_write_regs(gspca_dev, 0x0042, pac207_sensor_init[3], 8);
293 pac207_write_regs(gspca_dev, 0x0042, pac207_sensor_init[4], 8);
294 pac207_write_regs(gspca_dev, 0x0048, PacReg72, 4);
295 288
296 /* Compression Balance */ 289 /* Compression Balance */
297 if (gspca_dev->width == 176) 290 if (gspca_dev->width == 176)