diff driver/pt1_tuner.c @ 71:28f25ec7f962

correct number of initialization data.
author Yoshiki Yazawa <yaz@honeyplanet.jp>
date Sat, 31 Oct 2009 04:15:22 +0900
parents 272a8fba970b
children 517e61637f7b
line wrap: on
line diff
--- a/driver/pt1_tuner.c	Wed Oct 28 21:04:53 2009 +0900
+++ b/driver/pt1_tuner.c	Sat Oct 31 04:15:22 2009 +0900
@@ -110,13 +110,20 @@
 		printk(KERN_INFO "PT1:ISDB-S Read(%x)\n", val);
 		return -EIO ;
 	}
-	for(lp = 0 ; lp < MAX_ISDB_S_INIT ; lp++){
-		if(cardtype == PT1)
+
+	if(cardtype == PT1) {
+		for(lp = 0 ; lp < MAX_ISDB_S_INIT ; lp++){
 			memcpy(&wk, isdb_s_initial_pt1[lp], sizeof(WBLOCK));
-		if(cardtype == PT2)
+			wk.addr = addr;
+			i2c_write(regs, lock, &wk);
+		}
+	}
+	else if(cardtype == PT2) {
+		for(lp = 0 ; lp < MAX_ISDB_S_INIT2 ; lp++){
 			memcpy(&wk, isdb_s_initial_pt2[lp], sizeof(WBLOCK));
-		wk.addr = addr;
-		i2c_write(regs, lock, &wk);
+			wk.addr = addr;
+			i2c_write(regs, lock, &wk);
+		}
 	}
 
 	return 0 ;
@@ -127,17 +134,22 @@
 	WBLOCK	wk;
 
 	// ISDB-S/T½é´ü²½
-	for(lp = 0 ; lp < MAX_ISDB_T_INIT ; lp++){
-		if(cardtype == PT1)
+	if(cardtype == PT1) {
+		for(lp = 0 ; lp < MAX_ISDB_T_INIT ; lp++){
 			memcpy(&wk, isdb_t_initial_pt1[lp], sizeof(WBLOCK));
-		if(cardtype == PT2)
+			wk.addr = addr;
+			i2c_write(regs, lock, &wk);
+		}
+	}
+	else if(cardtype == PT2) {
+		for(lp = 0 ; lp < MAX_ISDB_T_INIT2 ; lp++){
 			memcpy(&wk, isdb_t_initial_pt2[lp], sizeof(WBLOCK));
-		wk.addr = addr;
-		i2c_write(regs, lock, &wk);
+			wk.addr = addr;
+			i2c_write(regs, lock, &wk);
+		}
 	}
-
+}
 
-}
 int		tuner_init(void __iomem *regs, int cardtype, struct mutex *lock, int tuner_no)
 {