diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-03-11 12:41:56 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-05-18 00:47:03 -0300 |
commit | 945cdfa2c99e2a3f5ead11519ba11ed1df2dd5c1 (patch) | |
tree | 0a0a62bca91befd1e607ca6b138df2fd2083fea8 /drivers/media/IR/ir-keytable.c | |
parent | 8b0d2a052733d0a0e8ed59aeb8c7e6c90fdb793e (diff) | |
download | linux-945cdfa2c99e2a3f5ead11519ba11ed1df2dd5c1.tar.bz2 |
V4L/DVB: ir: use a real device instead of a virtual class
Change the ir-sysfs approach to create irrcv0 as a device, instead of
using class_dev. Also, change the way input is registered, in order
to make its parent to be the irrcv device.
Due to this change, now the event device is created under
/sys/class/ir/irrcv class:
/sys/class/irrcv/irrcv0/
|-- current_protocol
|-- device -> ../../../1-3
|-- input9
| |-- capabilities
| | |-- abs
...
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 | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/drivers/media/IR/ir-keytable.c b/drivers/media/IR/ir-keytable.c index bfca26d51827..af1f4d7fb910 100644 --- a/drivers/media/IR/ir-keytable.c +++ b/drivers/media/IR/ir-keytable.c @@ -449,22 +449,15 @@ int ir_input_register(struct input_dev *input_dev, input_dev->setkeycode = ir_setkeycode; input_set_drvdata(input_dev, ir_dev); - rc = input_register_device(input_dev); - if (rc < 0) - goto err; - rc = ir_register_class(input_dev); - if (rc < 0) { - input_unregister_device(input_dev); + if (rc < 0) goto err; - } return 0; err: kfree(rc_tab->scan); kfree(ir_dev); - input_set_drvdata(input_dev, NULL); return rc; } EXPORT_SYMBOL_GPL(ir_input_register); @@ -493,7 +486,6 @@ void ir_input_unregister(struct input_dev *dev) ir_unregister_class(dev); kfree(ir_dev); - input_unregister_device(dev); } EXPORT_SYMBOL_GPL(ir_input_unregister); |