Mercurial > pt1
comparison 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 |
comparison
equal
deleted
inserted
replaced
70:babd84ff70ff | 71:28f25ec7f962 |
---|---|
108 val = i2c_read(regs, lock, &wk, 1); | 108 val = i2c_read(regs, lock, &wk, 1); |
109 if((val & 0xff) != 0x41){ | 109 if((val & 0xff) != 0x41){ |
110 printk(KERN_INFO "PT1:ISDB-S Read(%x)\n", val); | 110 printk(KERN_INFO "PT1:ISDB-S Read(%x)\n", val); |
111 return -EIO ; | 111 return -EIO ; |
112 } | 112 } |
113 for(lp = 0 ; lp < MAX_ISDB_S_INIT ; lp++){ | 113 |
114 if(cardtype == PT1) | 114 if(cardtype == PT1) { |
115 for(lp = 0 ; lp < MAX_ISDB_S_INIT ; lp++){ | |
115 memcpy(&wk, isdb_s_initial_pt1[lp], sizeof(WBLOCK)); | 116 memcpy(&wk, isdb_s_initial_pt1[lp], sizeof(WBLOCK)); |
116 if(cardtype == PT2) | 117 wk.addr = addr; |
118 i2c_write(regs, lock, &wk); | |
119 } | |
120 } | |
121 else if(cardtype == PT2) { | |
122 for(lp = 0 ; lp < MAX_ISDB_S_INIT2 ; lp++){ | |
117 memcpy(&wk, isdb_s_initial_pt2[lp], sizeof(WBLOCK)); | 123 memcpy(&wk, isdb_s_initial_pt2[lp], sizeof(WBLOCK)); |
118 wk.addr = addr; | 124 wk.addr = addr; |
119 i2c_write(regs, lock, &wk); | 125 i2c_write(regs, lock, &wk); |
126 } | |
120 } | 127 } |
121 | 128 |
122 return 0 ; | 129 return 0 ; |
123 } | 130 } |
124 static void init_isdb_t(void __iomem *regs, int cardtype, struct mutex *lock, __u32 addr) | 131 static void init_isdb_t(void __iomem *regs, int cardtype, struct mutex *lock, __u32 addr) |
125 { | 132 { |
126 int lp ; | 133 int lp ; |
127 WBLOCK wk; | 134 WBLOCK wk; |
128 | 135 |
129 // ISDB-S/T初期化 | 136 // ISDB-S/T初期化 |
130 for(lp = 0 ; lp < MAX_ISDB_T_INIT ; lp++){ | 137 if(cardtype == PT1) { |
131 if(cardtype == PT1) | 138 for(lp = 0 ; lp < MAX_ISDB_T_INIT ; lp++){ |
132 memcpy(&wk, isdb_t_initial_pt1[lp], sizeof(WBLOCK)); | 139 memcpy(&wk, isdb_t_initial_pt1[lp], sizeof(WBLOCK)); |
133 if(cardtype == PT2) | 140 wk.addr = addr; |
141 i2c_write(regs, lock, &wk); | |
142 } | |
143 } | |
144 else if(cardtype == PT2) { | |
145 for(lp = 0 ; lp < MAX_ISDB_T_INIT2 ; lp++){ | |
134 memcpy(&wk, isdb_t_initial_pt2[lp], sizeof(WBLOCK)); | 146 memcpy(&wk, isdb_t_initial_pt2[lp], sizeof(WBLOCK)); |
135 wk.addr = addr; | 147 wk.addr = addr; |
136 i2c_write(regs, lock, &wk); | 148 i2c_write(regs, lock, &wk); |
137 } | 149 } |
138 | 150 } |
139 | 151 } |
140 } | 152 |
141 int tuner_init(void __iomem *regs, int cardtype, struct mutex *lock, int tuner_no) | 153 int tuner_init(void __iomem *regs, int cardtype, struct mutex *lock, int tuner_no) |
142 { | 154 { |
143 | 155 |
144 int rc ; | 156 int rc ; |
145 WBLOCK wk; | 157 WBLOCK wk; |