diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-11-27 20:40:22 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-12-05 15:42:19 -0500 |
commit | 8573b74af25c279de3e309beddcba984bee9ec15 (patch) | |
tree | 62635afe2df0727b5eed544f43d9e6b5c2aabdcb /drivers/media/video | |
parent | ef53a1159dfcdc1fecf5adb5b8d26803f194c09b (diff) |
V4L/DVB (13533): ir: use dynamic tables, instead of static ones
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video')
-rw-r--r-- | drivers/media/video/bt8xx/bttv-input.c | 8 | ||||
-rw-r--r-- | drivers/media/video/cx231xx/cx231xx-input.c | 3 | ||||
-rw-r--r-- | drivers/media/video/cx23885/cx23885-input.c | 3 | ||||
-rw-r--r-- | drivers/media/video/cx88/cx88-input.c | 14 | ||||
-rw-r--r-- | drivers/media/video/em28xx/em28xx-input.c | 3 | ||||
-rw-r--r-- | drivers/media/video/ir-kbd-i2c.c | 2 | ||||
-rw-r--r-- | drivers/media/video/saa7134/saa7134-input.c | 8 |
7 files changed, 19 insertions, 22 deletions
diff --git a/drivers/media/video/bt8xx/bttv-input.c b/drivers/media/video/bt8xx/bttv-input.c index ebd51afe8761..62408ccf34c8 100644 --- a/drivers/media/video/bt8xx/bttv-input.c +++ b/drivers/media/video/bt8xx/bttv-input.c | |||
@@ -73,12 +73,12 @@ static void ir_handle_key(struct bttv *btv) | |||
73 | 73 | ||
74 | if ((ir->mask_keydown && (0 != (gpio & ir->mask_keydown))) || | 74 | if ((ir->mask_keydown && (0 != (gpio & ir->mask_keydown))) || |
75 | (ir->mask_keyup && (0 == (gpio & ir->mask_keyup)))) { | 75 | (ir->mask_keyup && (0 == (gpio & ir->mask_keyup)))) { |
76 | ir_input_keydown(ir->dev,&ir->ir,data,data); | 76 | ir_input_keydown(ir->dev, &ir->ir, data); |
77 | } else { | 77 | } else { |
78 | /* HACK: Probably, ir->mask_keydown is missing | 78 | /* HACK: Probably, ir->mask_keydown is missing |
79 | for this board */ | 79 | for this board */ |
80 | if (btv->c.type == BTTV_BOARD_WINFAST2000) | 80 | if (btv->c.type == BTTV_BOARD_WINFAST2000) |
81 | ir_input_keydown(ir->dev, &ir->ir, data, data); | 81 | ir_input_keydown(ir->dev, &ir->ir, data); |
82 | 82 | ||
83 | ir_input_nokey(ir->dev,&ir->ir); | 83 | ir_input_nokey(ir->dev,&ir->ir); |
84 | } | 84 | } |
@@ -104,7 +104,7 @@ static void ir_enltv_handle_key(struct bttv *btv) | |||
104 | gpio, data, | 104 | gpio, data, |
105 | (gpio & ir->mask_keyup) ? " up" : "up/down"); | 105 | (gpio & ir->mask_keyup) ? " up" : "up/down"); |
106 | 106 | ||
107 | ir_input_keydown(ir->dev, &ir->ir, data, data); | 107 | ir_input_keydown(ir->dev, &ir->ir, data); |
108 | if (keyup) | 108 | if (keyup) |
109 | ir_input_nokey(ir->dev, &ir->ir); | 109 | ir_input_nokey(ir->dev, &ir->ir); |
110 | } else { | 110 | } else { |
@@ -118,7 +118,7 @@ static void ir_enltv_handle_key(struct bttv *btv) | |||
118 | if (keyup) | 118 | if (keyup) |
119 | ir_input_nokey(ir->dev, &ir->ir); | 119 | ir_input_nokey(ir->dev, &ir->ir); |
120 | else | 120 | else |
121 | ir_input_keydown(ir->dev, &ir->ir, data, data); | 121 | ir_input_keydown(ir->dev, &ir->ir, data); |
122 | } | 122 | } |
123 | 123 | ||
124 | ir->last_gpio = data | keyup; | 124 | ir->last_gpio = data | keyup; |
diff --git a/drivers/media/video/cx231xx/cx231xx-input.c b/drivers/media/video/cx231xx/cx231xx-input.c index 48f22fa38e6c..58dd39bc6787 100644 --- a/drivers/media/video/cx231xx/cx231xx-input.c +++ b/drivers/media/video/cx231xx/cx231xx-input.c | |||
@@ -126,8 +126,7 @@ static void cx231xx_ir_handle_key(struct cx231xx_IR *ir) | |||
126 | 126 | ||
127 | if (do_sendkey) { | 127 | if (do_sendkey) { |
128 | dprintk("sending keypress\n"); | 128 | dprintk("sending keypress\n"); |
129 | ir_input_keydown(ir->input, &ir->ir, poll_result.rc_data[0], | 129 | ir_input_keydown(ir->input, &ir->ir, poll_result.rc_data[0]); |
130 | poll_result.rc_data[0]); | ||
131 | ir_input_nokey(ir->input, &ir->ir); | 130 | ir_input_nokey(ir->input, &ir->ir); |
132 | } | 131 | } |
133 | 132 | ||
diff --git a/drivers/media/video/cx23885/cx23885-input.c b/drivers/media/video/cx23885/cx23885-input.c index f000ed787d4e..fea882d1fbcb 100644 --- a/drivers/media/video/cx23885/cx23885-input.c +++ b/drivers/media/video/cx23885/cx23885-input.c | |||
@@ -94,8 +94,7 @@ static void cx23885_input_process_raw_rc5(struct cx23885_dev *dev) | |||
94 | RC5_START(ir_input->last_rc5) == 0) { | 94 | RC5_START(ir_input->last_rc5) == 0) { |
95 | /* This keypress is differnet: not an auto repeat */ | 95 | /* This keypress is differnet: not an auto repeat */ |
96 | ir_input_nokey(ir_input->dev, &ir_input->ir); | 96 | ir_input_nokey(ir_input->dev, &ir_input->ir); |
97 | ir_input_keydown(ir_input->dev, &ir_input->ir, | 97 | ir_input_keydown(ir_input->dev, &ir_input->ir, command); |
98 | command, ir_input->code); | ||
99 | } | 98 | } |
100 | ir_input->last_rc5 = rc5; | 99 | ir_input->last_rc5 = rc5; |
101 | 100 | ||
diff --git a/drivers/media/video/cx88/cx88-input.c b/drivers/media/video/cx88/cx88-input.c index 47c03019357d..7b2066415d7e 100644 --- a/drivers/media/video/cx88/cx88-input.c +++ b/drivers/media/video/cx88/cx88-input.c | |||
@@ -118,13 +118,13 @@ static void cx88_ir_handle_key(struct cx88_IR *ir) | |||
118 | 118 | ||
119 | data = (data << 4) | ((gpio_key & 0xf0) >> 4); | 119 | data = (data << 4) | ((gpio_key & 0xf0) >> 4); |
120 | 120 | ||
121 | ir_input_keydown(ir->input, &ir->ir, data, data); | 121 | ir_input_keydown(ir->input, &ir->ir, data); |
122 | ir_input_nokey(ir->input, &ir->ir); | 122 | ir_input_nokey(ir->input, &ir->ir); |
123 | 123 | ||
124 | } else if (ir->mask_keydown) { | 124 | } else if (ir->mask_keydown) { |
125 | /* bit set on keydown */ | 125 | /* bit set on keydown */ |
126 | if (gpio & ir->mask_keydown) { | 126 | if (gpio & ir->mask_keydown) { |
127 | ir_input_keydown(ir->input, &ir->ir, data, data); | 127 | ir_input_keydown(ir->input, &ir->ir, data); |
128 | } else { | 128 | } else { |
129 | ir_input_nokey(ir->input, &ir->ir); | 129 | ir_input_nokey(ir->input, &ir->ir); |
130 | } | 130 | } |
@@ -132,14 +132,14 @@ static void cx88_ir_handle_key(struct cx88_IR *ir) | |||
132 | } else if (ir->mask_keyup) { | 132 | } else if (ir->mask_keyup) { |
133 | /* bit cleared on keydown */ | 133 | /* bit cleared on keydown */ |
134 | if (0 == (gpio & ir->mask_keyup)) { | 134 | if (0 == (gpio & ir->mask_keyup)) { |
135 | ir_input_keydown(ir->input, &ir->ir, data, data); | 135 | ir_input_keydown(ir->input, &ir->ir, data); |
136 | } else { | 136 | } else { |
137 | ir_input_nokey(ir->input, &ir->ir); | 137 | ir_input_nokey(ir->input, &ir->ir); |
138 | } | 138 | } |
139 | 139 | ||
140 | } else { | 140 | } else { |
141 | /* can't distinguish keydown/up :-/ */ | 141 | /* can't distinguish keydown/up :-/ */ |
142 | ir_input_keydown(ir->input, &ir->ir, data, data); | 142 | ir_input_keydown(ir->input, &ir->ir, data); |
143 | ir_input_nokey(ir->input, &ir->ir); | 143 | ir_input_nokey(ir->input, &ir->ir); |
144 | } | 144 | } |
145 | } | 145 | } |
@@ -487,7 +487,7 @@ void cx88_ir_irq(struct cx88_core *core) | |||
487 | 487 | ||
488 | ir_dprintk("Key Code: %x\n", (ircode >> 16) & 0x7f); | 488 | ir_dprintk("Key Code: %x\n", (ircode >> 16) & 0x7f); |
489 | 489 | ||
490 | ir_input_keydown(ir->input, &ir->ir, (ircode >> 16) & 0x7f, (ircode >> 16) & 0xff); | 490 | ir_input_keydown(ir->input, &ir->ir, (ircode >> 16) & 0x7f); |
491 | ir->release = jiffies + msecs_to_jiffies(120); | 491 | ir->release = jiffies + msecs_to_jiffies(120); |
492 | break; | 492 | break; |
493 | case CX88_BOARD_HAUPPAUGE: | 493 | case CX88_BOARD_HAUPPAUGE: |
@@ -524,7 +524,7 @@ void cx88_ir_irq(struct cx88_core *core) | |||
524 | if ( dev != 0x1e && dev != 0x1f ) | 524 | if ( dev != 0x1e && dev != 0x1f ) |
525 | /* not a hauppauge remote */ | 525 | /* not a hauppauge remote */ |
526 | break; | 526 | break; |
527 | ir_input_keydown(ir->input, &ir->ir, code, ircode); | 527 | ir_input_keydown(ir->input, &ir->ir, code); |
528 | ir->release = jiffies + msecs_to_jiffies(120); | 528 | ir->release = jiffies + msecs_to_jiffies(120); |
529 | break; | 529 | break; |
530 | case CX88_BOARD_PINNACLE_PCTV_HD_800i: | 530 | case CX88_BOARD_PINNACLE_PCTV_HD_800i: |
@@ -532,7 +532,7 @@ void cx88_ir_irq(struct cx88_core *core) | |||
532 | ir_dprintk("biphase decoded: %x\n", ircode); | 532 | ir_dprintk("biphase decoded: %x\n", ircode); |
533 | if ((ircode & 0xfffff000) != 0x3000) | 533 | if ((ircode & 0xfffff000) != 0x3000) |
534 | break; | 534 | break; |
535 | ir_input_keydown(ir->input, &ir->ir, ircode & 0x3f, ircode); | 535 | ir_input_keydown(ir->input, &ir->ir, ircode & 0x3f); |
536 | ir->release = jiffies + msecs_to_jiffies(120); | 536 | ir->release = jiffies + msecs_to_jiffies(120); |
537 | break; | 537 | break; |
538 | } | 538 | } |
diff --git a/drivers/media/video/em28xx/em28xx-input.c b/drivers/media/video/em28xx/em28xx-input.c index 7a0fe3816e3d..990ee04bbd5e 100644 --- a/drivers/media/video/em28xx/em28xx-input.c +++ b/drivers/media/video/em28xx/em28xx-input.c | |||
@@ -282,8 +282,7 @@ static void em28xx_ir_handle_key(struct em28xx_IR *ir) | |||
282 | 282 | ||
283 | if (do_sendkey) { | 283 | if (do_sendkey) { |
284 | dprintk("sending keypress\n"); | 284 | dprintk("sending keypress\n"); |
285 | ir_input_keydown(ir->input, &ir->ir, poll_result.rc_data[0], | 285 | ir_input_keydown(ir->input, &ir->ir, poll_result.rc_data[0]); |
286 | poll_result.rc_data[0]); | ||
287 | ir_input_nokey(ir->input, &ir->ir); | 286 | ir_input_nokey(ir->input, &ir->ir); |
288 | } | 287 | } |
289 | 288 | ||
diff --git a/drivers/media/video/ir-kbd-i2c.c b/drivers/media/video/ir-kbd-i2c.c index aec36660987d..9c6d0ae58b1f 100644 --- a/drivers/media/video/ir-kbd-i2c.c +++ b/drivers/media/video/ir-kbd-i2c.c | |||
@@ -275,7 +275,7 @@ static void ir_key_poll(struct IR_i2c *ir) | |||
275 | if (0 == rc) { | 275 | if (0 == rc) { |
276 | ir_input_nokey(ir->input, &ir->ir); | 276 | ir_input_nokey(ir->input, &ir->ir); |
277 | } else { | 277 | } else { |
278 | ir_input_keydown(ir->input, &ir->ir, ir_key, ir_raw); | 278 | ir_input_keydown(ir->input, &ir->ir, ir_key); |
279 | } | 279 | } |
280 | } | 280 | } |
281 | 281 | ||
diff --git a/drivers/media/video/saa7134/saa7134-input.c b/drivers/media/video/saa7134/saa7134-input.c index f658f2513992..439f3d54d009 100644 --- a/drivers/media/video/saa7134/saa7134-input.c +++ b/drivers/media/video/saa7134/saa7134-input.c | |||
@@ -102,14 +102,14 @@ static int build_key(struct saa7134_dev *dev) | |||
102 | if (data == ir->mask_keycode) | 102 | if (data == ir->mask_keycode) |
103 | ir_input_nokey(ir->dev, &ir->ir); | 103 | ir_input_nokey(ir->dev, &ir->ir); |
104 | else | 104 | else |
105 | ir_input_keydown(ir->dev, &ir->ir, data, data); | 105 | ir_input_keydown(ir->dev, &ir->ir, data); |
106 | return 0; | 106 | return 0; |
107 | } | 107 | } |
108 | 108 | ||
109 | if (ir->polling) { | 109 | if (ir->polling) { |
110 | if ((ir->mask_keydown && (0 != (gpio & ir->mask_keydown))) || | 110 | if ((ir->mask_keydown && (0 != (gpio & ir->mask_keydown))) || |
111 | (ir->mask_keyup && (0 == (gpio & ir->mask_keyup)))) { | 111 | (ir->mask_keyup && (0 == (gpio & ir->mask_keyup)))) { |
112 | ir_input_keydown(ir->dev, &ir->ir, data, data); | 112 | ir_input_keydown(ir->dev, &ir->ir, data); |
113 | } else { | 113 | } else { |
114 | ir_input_nokey(ir->dev, &ir->ir); | 114 | ir_input_nokey(ir->dev, &ir->ir); |
115 | } | 115 | } |
@@ -117,7 +117,7 @@ static int build_key(struct saa7134_dev *dev) | |||
117 | else { /* IRQ driven mode - handle key press and release in one go */ | 117 | else { /* IRQ driven mode - handle key press and release in one go */ |
118 | if ((ir->mask_keydown && (0 != (gpio & ir->mask_keydown))) || | 118 | if ((ir->mask_keydown && (0 != (gpio & ir->mask_keydown))) || |
119 | (ir->mask_keyup && (0 == (gpio & ir->mask_keyup)))) { | 119 | (ir->mask_keyup && (0 == (gpio & ir->mask_keyup)))) { |
120 | ir_input_keydown(ir->dev, &ir->ir, data, data); | 120 | ir_input_keydown(ir->dev, &ir->ir, data); |
121 | ir_input_nokey(ir->dev, &ir->ir); | 121 | ir_input_nokey(ir->dev, &ir->ir); |
122 | } | 122 | } |
123 | } | 123 | } |
@@ -938,7 +938,7 @@ static void nec_task(unsigned long data) | |||
938 | dprintk("scancode = 0x%02x (code = 0x%02x, notcode= 0x%02x)\n", | 938 | dprintk("scancode = 0x%02x (code = 0x%02x, notcode= 0x%02x)\n", |
939 | ir->code, ircode, not_code); | 939 | ir->code, ircode, not_code); |
940 | 940 | ||
941 | ir_input_keydown(ir->dev, &ir->ir, ir->code, ir->code); | 941 | ir_input_keydown(ir->dev, &ir->ir, ir->code); |
942 | } else | 942 | } else |
943 | dprintk("Repeat last key\n"); | 943 | dprintk("Repeat last key\n"); |
944 | 944 | ||