diff mbox

[07/21] gspca pac7302/pac7311: separate stopN

Message ID 4AECC4D5.2000006@freemail.hu (mailing list archive)
State Changes Requested
Headers show

Commit Message

Németh Márton Oct. 31, 2009, 11:14 p.m. UTC
None
diff mbox

Patch

diff -uprN g/drivers/media/video/gspca/pac7311.c h/drivers/media/video/gspca/pac7311.c
--- g/drivers/media/video/gspca/pac7311.c	2009-10-30 18:03:15.000000000 +0100
+++ h/drivers/media/video/gspca/pac7311.c	2009-10-30 18:01:57.000000000 +0100
@@ -782,16 +782,15 @@  static int pac7311_sd_start(struct gspca
 	return 0;
 }

-static void sd_stopN(struct gspca_dev *gspca_dev)
+static void pac7302_sd_stopN(struct gspca_dev *gspca_dev)
 {
-	struct sd *sd = (struct sd *) gspca_dev;
+	reg_w(gspca_dev, 0xff, 0x01);
+	reg_w(gspca_dev, 0x78, 0x00);
+	reg_w(gspca_dev, 0x78, 0x00);
+}

-	if (sd->sensor == SENSOR_PAC7302) {
-		reg_w(gspca_dev, 0xff, 0x01);
-		reg_w(gspca_dev, 0x78, 0x00);
-		reg_w(gspca_dev, 0x78, 0x00);
-		return;
-	}
+static void pac7311_sd_stopN(struct gspca_dev *gspca_dev)
+{
 	reg_w(gspca_dev, 0xff, 0x04);
 	reg_w(gspca_dev, 0x27, 0x80);
 	reg_w(gspca_dev, 0x28, 0xca);
@@ -1177,7 +1176,7 @@  static struct sd_desc pac7302_sd_desc =
 	.config = pac7302_sd_config,
 	.init = pac7302_sd_init,
 	.start = pac7302_sd_start,
-	.stopN = sd_stopN,
+	.stopN = pac7302_sd_stopN,
 	.stop0 = sd_stop0,
 	.pkt_scan = pac7302_sd_pkt_scan,
 	.dq_callback = do_autogain,
@@ -1191,7 +1190,7 @@  static struct sd_desc pac7311_sd_desc =
 	.config = pac7311_sd_config,
 	.init = pac7311_sd_init,
 	.start = pac7311_sd_start,
-	.stopN = sd_stopN,
+	.stopN = pac7311_sd_stopN,
 	.stop0 = sd_stop0,
 	.pkt_scan = pac7311_sd_pkt_scan,
 	.dq_callback = do_autogain,