aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging
diff options
context:
space:
mode:
authorDavid Härdeman <david@hardeman.nu>2010-10-29 15:08:07 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-12-29 05:16:35 -0500
commit62c6503125389763a74911408d984c5dd09eeb97 (patch)
treea9b419280d25fca5086d82f8992a1d5843da75f1 /drivers/staging
parent2997137be8eba5bf9c07a24d5fda1f4225f9ca7d (diff)
[media] ir-core: remove remaining users of the ir-functions keyhandlers
This patch removes the remaining usages of the ir_input_nokey() and ir_input_keydown() functions provided by drivers/media/IR/ir-functions.c by using the corresponding functionality in ir-core instead. Signed-off-by: David Härdeman <david@hardeman.nu> Acked-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/tm6000/tm6000-input.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/drivers/staging/tm6000/tm6000-input.c b/drivers/staging/tm6000/tm6000-input.c
index 6022caaa739..3e74884da25 100644
--- a/drivers/staging/tm6000/tm6000-input.c
+++ b/drivers/staging/tm6000/tm6000-input.c
@@ -25,7 +25,6 @@
25#include <linux/usb.h> 25#include <linux/usb.h>
26 26
27#include <media/ir-core.h> 27#include <media/ir-core.h>
28#include <media/ir-common.h>
29 28
30#include "tm6000.h" 29#include "tm6000.h"
31#include "tm6000-regs.h" 30#include "tm6000-regs.h"
@@ -52,7 +51,6 @@ struct tm6000_ir_poll_result {
52struct tm6000_IR { 51struct tm6000_IR {
53 struct tm6000_core *dev; 52 struct tm6000_core *dev;
54 struct ir_input_dev *input; 53 struct ir_input_dev *input;
55 struct ir_input_state ir;
56 char name[32]; 54 char name[32];
57 char phys[32]; 55 char phys[32];
58 56
@@ -67,6 +65,7 @@ struct tm6000_IR {
67 int (*get_key) (struct tm6000_IR *, struct tm6000_ir_poll_result *); 65 int (*get_key) (struct tm6000_IR *, struct tm6000_ir_poll_result *);
68 66
69 /* IR device properties */ 67 /* IR device properties */
68 u64 ir_type;
70 struct ir_dev_props props; 69 struct ir_dev_props props;
71}; 70};
72 71
@@ -145,7 +144,7 @@ static int default_polling_getkey(struct tm6000_IR *ir,
145 return 0; 144 return 0;
146 145
147 if (&dev->int_in) { 146 if (&dev->int_in) {
148 if (ir->ir.ir_type == IR_TYPE_RC5) 147 if (ir->ir_type == IR_TYPE_RC5)
149 poll_result->rc_data = ir->urb_data[0]; 148 poll_result->rc_data = ir->urb_data[0];
150 else 149 else
151 poll_result->rc_data = ir->urb_data[0] | ir->urb_data[1] << 8; 150 poll_result->rc_data = ir->urb_data[0] | ir->urb_data[1] << 8;
@@ -155,7 +154,7 @@ static int default_polling_getkey(struct tm6000_IR *ir,
155 tm6000_set_reg(dev, REQ_04_EN_DISABLE_MCU_INT, 2, 1); 154 tm6000_set_reg(dev, REQ_04_EN_DISABLE_MCU_INT, 2, 1);
156 msleep(10); 155 msleep(10);
157 156
158 if (ir->ir.ir_type == IR_TYPE_RC5) { 157 if (ir->ir_type == IR_TYPE_RC5) {
159 rc = tm6000_read_write_usb(dev, USB_DIR_IN | 158 rc = tm6000_read_write_usb(dev, USB_DIR_IN |
160 USB_TYPE_VENDOR | USB_RECIP_DEVICE, 159 USB_TYPE_VENDOR | USB_RECIP_DEVICE,
161 REQ_02_GET_IR_CODE, 0, 0, buf, 1); 160 REQ_02_GET_IR_CODE, 0, 0, buf, 1);
@@ -201,10 +200,7 @@ static void tm6000_ir_handle_key(struct tm6000_IR *ir)
201 dprintk("ir->get_key result data=%04x\n", poll_result.rc_data); 200 dprintk("ir->get_key result data=%04x\n", poll_result.rc_data);
202 201
203 if (ir->key) { 202 if (ir->key) {
204 ir_input_keydown(ir->input->input_dev, &ir->ir, 203 ir_keydown(ir->input->input_dev, poll_result.rc_data, 0);
205 (u32)poll_result.rc_data);
206
207 ir_input_nokey(ir->input->input_dev, &ir->ir);
208 ir->key = 0; 204 ir->key = 0;
209 } 205 }
210 return; 206 return;
@@ -291,9 +287,6 @@ int tm6000_ir_init(struct tm6000_core *dev)
291 strlcat(ir->phys, "/input0", sizeof(ir->phys)); 287 strlcat(ir->phys, "/input0", sizeof(ir->phys));
292 288
293 tm6000_ir_change_protocol(ir, IR_TYPE_UNKNOWN); 289 tm6000_ir_change_protocol(ir, IR_TYPE_UNKNOWN);
294 err = ir_input_init(ir_input_dev->input_dev, &ir->ir, IR_TYPE_OTHER);
295 if (err < 0)
296 goto err_out_free;
297 290
298 ir_input_dev->input_dev->name = ir->name; 291 ir_input_dev->input_dev->name = ir->name;
299 ir_input_dev->input_dev->phys = ir->phys; 292 ir_input_dev->input_dev->phys = ir->phys;