aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/bt8xx/bttv-input.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/bt8xx/bttv-input.c')
-rw-r--r--drivers/media/video/bt8xx/bttv-input.c27
1 files changed, 13 insertions, 14 deletions
diff --git a/drivers/media/video/bt8xx/bttv-input.c b/drivers/media/video/bt8xx/bttv-input.c
index 773ee6a8eed4..c344b626e113 100644
--- a/drivers/media/video/bt8xx/bttv-input.c
+++ b/drivers/media/video/bt8xx/bttv-input.c
@@ -49,7 +49,7 @@ module_param(ir_rc5_remote_gap, int, 0644);
49 49
50static void ir_handle_key(struct bttv *btv) 50static void ir_handle_key(struct bttv *btv)
51{ 51{
52 struct card_ir *ir = btv->remote; 52 struct bttv_ir *ir = btv->remote;
53 u32 gpio,data; 53 u32 gpio,data;
54 54
55 /* read gpio value */ 55 /* read gpio value */
@@ -83,7 +83,7 @@ static void ir_handle_key(struct bttv *btv)
83 83
84static void ir_enltv_handle_key(struct bttv *btv) 84static void ir_enltv_handle_key(struct bttv *btv)
85{ 85{
86 struct card_ir *ir = btv->remote; 86 struct bttv_ir *ir = btv->remote;
87 u32 gpio, data, keyup; 87 u32 gpio, data, keyup;
88 88
89 /* read gpio value */ 89 /* read gpio value */
@@ -122,7 +122,7 @@ static void ir_enltv_handle_key(struct bttv *btv)
122 122
123void bttv_input_irq(struct bttv *btv) 123void bttv_input_irq(struct bttv *btv)
124{ 124{
125 struct card_ir *ir = btv->remote; 125 struct bttv_ir *ir = btv->remote;
126 126
127 if (!ir->polling) 127 if (!ir->polling)
128 ir_handle_key(btv); 128 ir_handle_key(btv);
@@ -131,7 +131,7 @@ void bttv_input_irq(struct bttv *btv)
131static void bttv_input_timer(unsigned long data) 131static void bttv_input_timer(unsigned long data)
132{ 132{
133 struct bttv *btv = (struct bttv*)data; 133 struct bttv *btv = (struct bttv*)data;
134 struct card_ir *ir = btv->remote; 134 struct bttv_ir *ir = btv->remote;
135 135
136 if (btv->c.type == BTTV_BOARD_ENLTV_FM_2) 136 if (btv->c.type == BTTV_BOARD_ENLTV_FM_2)
137 ir_enltv_handle_key(btv); 137 ir_enltv_handle_key(btv);
@@ -185,9 +185,9 @@ static u32 bttv_rc5_decode(unsigned int code)
185 return rc5; 185 return rc5;
186} 186}
187 187
188void bttv_rc5_timer_end(unsigned long data) 188static void bttv_rc5_timer_end(unsigned long data)
189{ 189{
190 struct card_ir *ir = (struct card_ir *)data; 190 struct bttv_ir *ir = (struct bttv_ir *)data;
191 struct timeval tv; 191 struct timeval tv;
192 unsigned long current_jiffies; 192 unsigned long current_jiffies;
193 u32 gap; 193 u32 gap;
@@ -206,7 +206,7 @@ void bttv_rc5_timer_end(unsigned long data)
206 } 206 }
207 207
208 /* signal we're ready to start a new code */ 208 /* signal we're ready to start a new code */
209 ir->active = 0; 209 ir->active = false;
210 210
211 /* Allow some timer jitter (RC5 is ~24ms anyway so this is ok) */ 211 /* Allow some timer jitter (RC5 is ~24ms anyway so this is ok) */
212 if (gap < 28000) { 212 if (gap < 28000) {
@@ -242,7 +242,7 @@ void bttv_rc5_timer_end(unsigned long data)
242 242
243static int bttv_rc5_irq(struct bttv *btv) 243static int bttv_rc5_irq(struct bttv *btv)
244{ 244{
245 struct card_ir *ir = btv->remote; 245 struct bttv_ir *ir = btv->remote;
246 struct timeval tv; 246 struct timeval tv;
247 u32 gpio; 247 u32 gpio;
248 u32 gap; 248 u32 gap;
@@ -278,7 +278,7 @@ static int bttv_rc5_irq(struct bttv *btv)
278 } 278 }
279 /* starting new code */ 279 /* starting new code */
280 } else { 280 } else {
281 ir->active = 1; 281 ir->active = true;
282 ir->code = 0; 282 ir->code = 0;
283 ir->base_time = tv; 283 ir->base_time = tv;
284 ir->last_bit = 0; 284 ir->last_bit = 0;
@@ -295,7 +295,7 @@ static int bttv_rc5_irq(struct bttv *btv)
295 295
296/* ---------------------------------------------------------------------- */ 296/* ---------------------------------------------------------------------- */
297 297
298static void bttv_ir_start(struct bttv *btv, struct card_ir *ir) 298static void bttv_ir_start(struct bttv *btv, struct bttv_ir *ir)
299{ 299{
300 if (ir->polling) { 300 if (ir->polling) {
301 setup_timer(&ir->timer, bttv_input_timer, (unsigned long)btv); 301 setup_timer(&ir->timer, bttv_input_timer, (unsigned long)btv);
@@ -303,9 +303,8 @@ static void bttv_ir_start(struct bttv *btv, struct card_ir *ir)
303 add_timer(&ir->timer); 303 add_timer(&ir->timer);
304 } else if (ir->rc5_gpio) { 304 } else if (ir->rc5_gpio) {
305 /* set timer_end for code completion */ 305 /* set timer_end for code completion */
306 init_timer(&ir->timer_end); 306 setup_timer(&ir->timer_end, bttv_rc5_timer_end,
307 ir->timer_end.function = bttv_rc5_timer_end; 307 (unsigned long)ir);
308 ir->timer_end.data = (unsigned long)ir;
309 ir->shift_by = 1; 308 ir->shift_by = 1;
310 ir->start = 3; 309 ir->start = 3;
311 ir->addr = 0x0; 310 ir->addr = 0x0;
@@ -409,7 +408,7 @@ int __devexit fini_bttv_i2c(struct bttv *btv)
409 408
410int bttv_input_init(struct bttv *btv) 409int bttv_input_init(struct bttv *btv)
411{ 410{
412 struct card_ir *ir; 411 struct bttv_ir *ir;
413 char *ir_codes = NULL; 412 char *ir_codes = NULL;
414 struct rc_dev *rc; 413 struct rc_dev *rc;
415 int err = -ENOMEM; 414 int err = -ENOMEM;