diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-03-24 19:47:53 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-05-17 23:52:59 -0400 |
commit | 995187bed30c0545e8da88372e9807da0a85911e (patch) | |
tree | e3e28eff10f8f01f1bfd7ff865a29076bf6700dc /drivers/media/IR/ir-sysfs.c | |
parent | 9f1547829a6f39fe6b2da22653dff40502f3d568 (diff) |
V4L/DVB: ir-core: dynamically load the compiled IR protocols
Instead of hardcoding the protocols into ir-core, add a register interface
for the IR protocol decoders, and convert ir-nec-decoder into a client of
ir-core.
With this approach, it is possible to dynamically load the needed IR protocols,
and to add a RAW IR interface module, registered as one IR raw protocol decoder.
This patch opens a way to register a lirc_dev interface to work as an userspace
IR protocol decoder.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/IR/ir-sysfs.c')
-rw-r--r-- | drivers/media/IR/ir-sysfs.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/media/IR/ir-sysfs.c b/drivers/media/IR/ir-sysfs.c index 253e66999f18..2279d5594b05 100644 --- a/drivers/media/IR/ir-sysfs.c +++ b/drivers/media/IR/ir-sysfs.c | |||
@@ -1,6 +1,6 @@ | |||
1 | /* ir-register.c - handle IR scancode->keycode tables | 1 | /* ir-register.c - handle IR scancode->keycode tables |
2 | * | 2 | * |
3 | * Copyright (C) 2009 by Mauro Carvalho Chehab <mchehab@redhat.com> | 3 | * Copyright (C) 2009-2010 by Mauro Carvalho Chehab <mchehab@redhat.com> |
4 | * | 4 | * |
5 | * This program is free software; you can redistribute it and/or modify | 5 | * This program is free software; you can redistribute it and/or modify |
6 | * it under the terms of the GNU General Public License as published by | 6 | * it under the terms of the GNU General Public License as published by |
@@ -28,7 +28,7 @@ static char *ir_devnode(struct device *dev, mode_t *mode) | |||
28 | return kasprintf(GFP_KERNEL, "irrcv/%s", dev_name(dev)); | 28 | return kasprintf(GFP_KERNEL, "irrcv/%s", dev_name(dev)); |
29 | } | 29 | } |
30 | 30 | ||
31 | struct class ir_input_class = { | 31 | static struct class ir_input_class = { |
32 | .name = "irrcv", | 32 | .name = "irrcv", |
33 | .devnode = ir_devnode, | 33 | .devnode = ir_devnode, |
34 | }; | 34 | }; |
@@ -251,6 +251,9 @@ static int __init ir_core_init(void) | |||
251 | return rc; | 251 | return rc; |
252 | } | 252 | } |
253 | 253 | ||
254 | /* Initialize/load the decoders that will be used */ | ||
255 | ir_raw_init(); | ||
256 | |||
254 | return 0; | 257 | return 0; |
255 | } | 258 | } |
256 | 259 | ||