aboutsummaryrefslogtreecommitdiffstats
path: root/include/media
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2009-12-11 07:44:23 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-12-15 21:18:44 -0500
commit75543cce0c1f46be495b981d8d3eda0882721d07 (patch)
treea9ce0d8919329369b174c63afadc372f82526e54 /include/media
parent865fbf20bed00d456556ecd4b4c9dadc45cba759 (diff)
V4L/DVB (13615): ir-core: create ir_input_register
Move non-V4L specific stuff from ir-functions ir_input_init() into a new function to register ir devices: ir_input_register(). Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'include/media')
-rw-r--r--include/media/ir-common.h2
-rw-r--r--include/media/ir-core.h9
2 files changed, 7 insertions, 4 deletions
diff --git a/include/media/ir-common.h b/include/media/ir-common.h
index 18d300414fa2..ac8ced6bf3e2 100644
--- a/include/media/ir-common.h
+++ b/include/media/ir-common.h
@@ -37,8 +37,6 @@ struct ir_input_state {
37 /* configuration */ 37 /* configuration */
38 int ir_type; 38 int ir_type;
39 39
40 struct ir_scancode_table keytable;
41
42 /* key info */ 40 /* key info */
43 u32 ir_key; /* ir scancode */ 41 u32 ir_key; /* ir scancode */
44 u32 keycode; /* linux key code */ 42 u32 keycode; /* linux key code */
diff --git a/include/media/ir-core.h b/include/media/ir-core.h
index 825d04a4e77b..ea76c199b67d 100644
--- a/include/media/ir-core.h
+++ b/include/media/ir-core.h
@@ -41,6 +41,11 @@ struct ir_scancode_table {
41 spinlock_t lock; 41 spinlock_t lock;
42}; 42};
43 43
44struct ir_input_dev {
45 struct input_dev *dev;
46 struct ir_scancode_table rc_tab;
47};
48
44/* Routines from ir-keytable.c */ 49/* Routines from ir-keytable.c */
45 50
46u32 ir_g_keycode_from_table(struct input_dev *input_dev, 51u32 ir_g_keycode_from_table(struct input_dev *input_dev,
@@ -50,8 +55,8 @@ int ir_set_keycode_table(struct input_dev *input_dev,
50 struct ir_scancode_table *rc_tab); 55 struct ir_scancode_table *rc_tab);
51 56
52int ir_roundup_tablesize(int n_elems); 57int ir_roundup_tablesize(int n_elems);
53int ir_copy_table(struct ir_scancode_table *destin, 58int ir_input_register(struct input_dev *dev,
54 const struct ir_scancode_table *origin); 59 struct ir_scancode_table *ir_codes);
55void ir_input_free(struct input_dev *input_dev); 60void ir_input_free(struct input_dev *input_dev);
56 61
57#endif 62#endif