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>
This commit is contained in:
Mauro Carvalho Chehab
2010-03-11 12:41:56 -03:00
parent 8b0d2a0527
commit 945cdfa2c9
3 changed files with 55 additions and 35 deletions

View File

@@ -47,11 +47,9 @@ struct ir_dev_props {
struct ir_input_dev {
struct input_dev *dev; /* Input device*/
struct device dev; /* device */
struct ir_scancode_table rc_tab; /* scan/key table */
unsigned long devno; /* device number */
struct attribute_group attr; /* IR attributes */
struct device *class_dev; /* virtual class dev */
const struct ir_dev_props *props; /* Device properties */
};
#define to_ir_input_dev(_attr) container_of(_attr, struct ir_input_dev, attr)