diff mbox

[6/6,media] gspca/sonixj: Fix support for sn9c120+ov7660

Message ID 20101209184239.02cba572@pedra (mailing list archive)
State RFC
Headers show

Commit Message

Mauro Carvalho Chehab Dec. 9, 2010, 8:42 p.m. UTC
None
diff mbox

Patch

diff --git a/drivers/media/video/gspca/sonixj.c b/drivers/media/video/gspca/sonixj.c
index 681f64b..2761155 100644
--- a/drivers/media/video/gspca/sonixj.c
+++ b/drivers/media/video/gspca/sonixj.c
@@ -1785,7 +1785,8 @@  static void bridge_init(struct gspca_dev *gspca_dev,
 	 * This combination doesn't use an inverted powerdown
 	 * Tested with USB ID = 0c45:60fb
 	 */
-	if (sd->sensor == SENSOR_OV7660 && sd->bridge == BRIDGE_SN9C105)
+	if (sd->sensor == SENSOR_OV7660 &&
+	    ((sd->bridge == BRIDGE_SN9C105) || (sd->bridge == BRIDGE_SN9C120))
 		reg1_inv_powerdown = 0;
 
 	switch (sd->sensor) {
@@ -2615,12 +2616,8 @@  static int sd_start(struct gspca_dev *gspca_dev)
 		break;
 	case SENSOR_OV7660:
 		init = ov7660_sensor_param1;
-		if (sd->bridge == BRIDGE_SN9C120) {
-			if (mode) {		/* 320x240 - 160x120 */
-				reg17 = 0xa2;
-				reg1 = 0x44;	/* 48 Mhz, video trf eneble */
-			}
-		} else if (sd->bridge == BRIDGE_SN9C105) {
+		if ((sd->bridge == BRIDGE_SN9C120) ||
+		    (sd->bridge == BRIDGE_SN9C105)) {
 			reg17 = 0xa2;
 			reg1 = 0x44;	/* 48 Mhz, video trf eneble */
 		} else {
@@ -3027,9 +3024,7 @@  static const __devinitdata struct usb_device_id device_table[] = {
 /*	{USB_DEVICE(0x0c45, 0x6132), BS(SN9C120, OV7670)}, */
 	{USB_DEVICE(0x0c45, 0x6138), BS(SN9C120, MO4000)},
 	{USB_DEVICE(0x0c45, 0x613a), BS(SN9C120, OV7648)},
-#if !defined CONFIG_USB_SN9C102 && !defined CONFIG_USB_SN9C102_MODULE
 	{USB_DEVICE(0x0c45, 0x613b), BS(SN9C120, OV7660)},
-#endif
 	{USB_DEVICE(0x0c45, 0x613c), BS(SN9C120, HV7131R)},
 	{USB_DEVICE(0x0c45, 0x613e), BS(SN9C120, OV7630)},
 	{USB_DEVICE(0x0c45, 0x6142), BS(SN9C120, PO2030N)},	/*sn9c120b*/
diff --git a/drivers/media/video/sn9c102/sn9c102_devtable.h b/drivers/media/video/sn9c102/sn9c102_devtable.h
index ccfa59c..340de19 100644
--- a/drivers/media/video/sn9c102/sn9c102_devtable.h
+++ b/drivers/media/video/sn9c102/sn9c102_devtable.h
@@ -127,9 +127,7 @@  static const struct usb_device_id sn9c102_id_table[] = {
 /*	{ SN9C102_USB_DEVICE(0x0c45, 0x6138, BRIDGE_SN9C120), }, MO8000 */
 #if !defined CONFIG_USB_GSPCA_SONIXJ && !defined CONFIG_USB_GSPCA_SONIXJ_MODULE
 	{ SN9C102_USB_DEVICE(0x0c45, 0x613a, BRIDGE_SN9C120), },
-#endif
 	{ SN9C102_USB_DEVICE(0x0c45, 0x613b, BRIDGE_SN9C120), },
-#if !defined CONFIG_USB_GSPCA_SONIXJ && !defined CONFIG_USB_GSPCA_SONIXJ_MODULE
 	{ SN9C102_USB_DEVICE(0x0c45, 0x613c, BRIDGE_SN9C120), },
 	{ SN9C102_USB_DEVICE(0x0c45, 0x613e, BRIDGE_SN9C120), },
 #endif