Skip to contentSkip to conversation

pac7311: remove redundant register page switching

PATCH New Németh Márton 1 participant 1 message Oct 3, 2009 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pac7311: remove redundant register page switching

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 <[email protected]>

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).

---

drivers/media/video/gspca/pac7311.c +0 -1
diff -upr d/drivers/media/video/gspca/pac7311.c e/drivers/media/video/gspca/pac7311.c
@@ -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);