diff options
author | Frederic Weisbecker | 2009-10-18 01:09:09 +0200 |
---|---|---|
committer | Frederic Weisbecker | 2009-10-18 01:12:33 +0200 |
commit | 0f8f86c7bdd1c954fbe153af437a0d91a6c5721a (patch) | |
tree | 94a8d419a470a4f9852ca397bb9bbe48db92ff5c /drivers/media/common/ir-functions.c | |
parent | Merge branch 'linus' into tracing/hw-breakpoints (diff) | |
parent | perf tools: Move dereference after NULL test (diff) | |
download | kernel-qcow2-linux-0f8f86c7bdd1c954fbe153af437a0d91a6c5721a.tar.gz kernel-qcow2-linux-0f8f86c7bdd1c954fbe153af437a0d91a6c5721a.tar.xz kernel-qcow2-linux-0f8f86c7bdd1c954fbe153af437a0d91a6c5721a.zip |
Merge commit 'perf/core' into perf/hw-breakpoint
Conflicts:
kernel/Makefile
kernel/trace/Makefile
kernel/trace/trace.h
samples/Makefile
Merge reason: We need to be uptodate with the perf events development
branch because we plan to rewrite the breakpoints API on top of
perf events.
Diffstat (limited to 'drivers/media/common/ir-functions.c')
-rw-r--r-- | drivers/media/common/ir-functions.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/drivers/media/common/ir-functions.c b/drivers/media/common/ir-functions.c index 16792a68a449..655474b29e21 100644 --- a/drivers/media/common/ir-functions.c +++ b/drivers/media/common/ir-functions.c @@ -58,13 +58,24 @@ static void ir_input_key_event(struct input_dev *dev, struct ir_input_state *ir) /* -------------------------------------------------------------------------- */ void ir_input_init(struct input_dev *dev, struct ir_input_state *ir, - int ir_type, IR_KEYTAB_TYPE *ir_codes) + int ir_type, struct ir_scancode_table *ir_codes) { int i; ir->ir_type = ir_type; + + memset(ir->ir_codes, sizeof(ir->ir_codes), 0); + + /* + * FIXME: This is a temporary workaround to use the new IR tables + * with the old approach. Later patches will replace this to a + * proper method + */ + if (ir_codes) - memcpy(ir->ir_codes, ir_codes, sizeof(ir->ir_codes)); + for (i = 0; i < ir_codes->size; i++) + if (ir_codes->scan[i].scancode < IR_KEYTAB_SIZE) + ir->ir_codes[ir_codes->scan[i].scancode] = ir_codes->scan[i].keycode; dev->keycode = ir->ir_codes; dev->keycodesize = sizeof(IR_KEYTAB_TYPE); |