diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-03-24 20:47:53 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-05-18 00:52:59 -0300 |
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 253e66999f1..2279d5594b0 100644 --- a/drivers/media/IR/ir-sysfs.c +++ b/drivers/media/IR/ir-sysfs.c @@ -1,6 +1,6 @@ /* ir-register.c - handle IR scancode->keycode tables * - * Copyright (C) 2009 by Mauro Carvalho Chehab <mchehab@redhat.com> + * Copyright (C) 2009-2010 by Mauro Carvalho Chehab <mchehab@redhat.com> * * This program is free software; you can redistribute it and/or modify * 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) return kasprintf(GFP_KERNEL, "irrcv/%s", dev_name(dev)); } -struct class ir_input_class = { +static struct class ir_input_class = { .name = "irrcv", .devnode = ir_devnode, }; @@ -251,6 +251,9 @@ static int __init ir_core_init(void) return rc; } + /* Initialize/load the decoders that will be used */ + ir_raw_init(); + return 0; } |