Lines Matching refs:i

82 	int i, result = -1;  in l4_cooked_read()  local
93 for (i = 0; i < 4; i++) in l4_cooked_read()
94 if (status & (1 << i)) { in l4_cooked_read()
96 axes[i] = inb(L4_PORT); in l4_cooked_read()
97 if (axes[i] > 252) axes[i] = -1; in l4_cooked_read()
126 int i, result = -1; in l4_getcal() local
140 for (i = 0; i < 4; i++) { in l4_getcal()
142 cal[i] = inb(L4_PORT); in l4_getcal()
157 int i, result = -1; in l4_setcal() local
171 for (i = 0; i < 4; i++) { in l4_setcal()
173 outb(cal[i], L4_PORT); in l4_setcal()
189 int i, t; in l4_calibrate() local
196 for (i = 0; i < 4; i++) { in l4_calibrate()
197 t = (max[i] * cal[i]) / 200; in l4_calibrate()
199 axes[i] = (axes[i] < 0) ? -1 : (axes[i] * cal[i]) / t; in l4_calibrate()
200 axes[i] = (axes[i] > 252) ? 252 : axes[i]; in l4_calibrate()
201 cal[i] = t; in l4_calibrate()
213 int i, j, rev, cards = 0; in l4_init() local
220 for (i = 0; i < 2; i++) { in l4_init()
223 outb(L4_SELECT_DIGITAL + i, L4_PORT); in l4_init()
229 if (inb(L4_PORT) != L4_SELECT_DIGITAL + i) continue; in l4_init()
239 if (!(l4_port[i * 4] = kmalloc(sizeof(struct l4) * 4, GFP_KERNEL))) { in l4_init()
243 memset(l4_port[i * 4], 0, sizeof(struct l4) * 4); in l4_init()
247 l4 = l4_port[i * 4 + j] = l4_port[i * 4] + j; in l4_init()
248 l4->port = i * 4 + j; in l4_init()
256 if (!i && !j) in l4_init()
266 l4_port[i * 4 + 0]->gameport.number, l4_port[i * 4 + 1]->gameport.number, in l4_init()
267 l4_port[i * 4 + 2]->gameport.number, l4_port[i * 4 + 3]->gameport.number, in l4_init()
268 i ? "secondary" : "primary", rev >> 4, rev, L4_PORT); in l4_init()
285 int i; in l4_exit() local
288 for (i = 0; i < 8; i++) in l4_exit()
289 if (l4_port[i]) { in l4_exit()
290 l4_setcal(l4_port[i]->port, cal); in l4_exit()
291 gameport_unregister_port(&l4_port[i]->gameport); in l4_exit()