diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-03-12 21:18:14 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-05-18 00:47:05 -0300 |
commit | 727e625cc2c114e449a78f851b0c12edac897a83 (patch) | |
tree | ec7b14d68fb1b79d636d50756082e61360610063 /drivers/media/IR/ir-keytable.c | |
parent | 9c89a181a09eaafca5fc638c3b7ce1620227f60a (diff) | |
download | linux-stable-727e625cc2c114e449a78f851b0c12edac897a83.tar.gz linux-stable-727e625cc2c114e449a78f851b0c12edac897a83.tar.bz2 linux-stable-727e625cc2c114e449a78f851b0c12edac897a83.zip |
V4L/DVB: ir-core: export driver name used by IR via uevent
Now, both driver and keytable names are exported to userspace. This
will help userspace to decide when a table need to be replaced
by another one.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/IR/ir-keytable.c')
-rw-r--r-- | drivers/media/IR/ir-keytable.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/media/IR/ir-keytable.c b/drivers/media/IR/ir-keytable.c index 6db3ff74659b..73fe4bec83bc 100644 --- a/drivers/media/IR/ir-keytable.c +++ b/drivers/media/IR/ir-keytable.c @@ -404,7 +404,8 @@ EXPORT_SYMBOL_GPL(ir_g_keycode_from_table); */ int ir_input_register(struct input_dev *input_dev, const struct ir_scancode_table *rc_tab, - const struct ir_dev_props *props) + const struct ir_dev_props *props, + const char *driver_name) { struct ir_input_dev *ir_dev; struct ir_scancode *keymap = rc_tab->scan; @@ -419,6 +420,10 @@ int ir_input_register(struct input_dev *input_dev, spin_lock_init(&ir_dev->rc_tab.lock); + ir_dev->driver_name = kmalloc(strlen(driver_name) + 1, GFP_KERNEL); + if (!ir_dev->driver_name) + return -ENOMEM; + strcpy(ir_dev->driver_name, driver_name); ir_dev->rc_tab.name = rc_tab->name; ir_dev->rc_tab.size = ir_roundup_tablesize(rc_tab->size); ir_dev->rc_tab.scan = kzalloc(ir_dev->rc_tab.size * |