aboutsummaryrefslogtreecommitdiffstats
path: root/include/media
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2010-04-02 12:18:42 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-05-19 11:56:50 -0400
commitb2245ba1644eb1eba400fd04c6e7bb3ab2d4a8fa (patch)
tree0b0213d19f51cd6cda191a91b970fa1fcc1d49b9 /include/media
parent6686fa6917caaaaf3d595df6accedb87607517c9 (diff)
V4L/DVB: ir: prepare IR code for a parameter change at register function
A latter patch will reuse the ir_input_register with a different meaning. Before it, change all occurrences to a temporary name. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'include/media')
-rw-r--r--include/media/ir-core.h26
1 files changed, 20 insertions, 6 deletions
diff --git a/include/media/ir-core.h b/include/media/ir-core.h
index 39df3cf9e845..8e975f24dae1 100644
--- a/include/media/ir-core.h
+++ b/include/media/ir-core.h
@@ -119,23 +119,37 @@ EXPORT_SYMBOL_GPL(IR_KEYTABLE(tabname))
119#define DEFINE_LEGACY_IR_KEYTABLE(tabname) \ 119#define DEFINE_LEGACY_IR_KEYTABLE(tabname) \
120 DEFINE_IR_KEYTABLE(tabname, IR_TYPE_UNKNOWN) 120 DEFINE_IR_KEYTABLE(tabname, IR_TYPE_UNKNOWN)
121 121
122/* Routines from rc-map.c */
123
124int ir_register_map(struct rc_keymap *map);
125void ir_unregister_map(struct rc_keymap *map);
126struct ir_scancode_table *get_rc_map(const char *name);
127
122/* Routines from ir-keytable.c */ 128/* Routines from ir-keytable.c */
123 129
124u32 ir_g_keycode_from_table(struct input_dev *input_dev, 130u32 ir_g_keycode_from_table(struct input_dev *input_dev,
125 u32 scancode); 131 u32 scancode);
126void ir_keyup(struct input_dev *dev); 132void ir_keyup(struct input_dev *dev);
127void ir_keydown(struct input_dev *dev, int scancode); 133void ir_keydown(struct input_dev *dev, int scancode);
128int ir_input_register(struct input_dev *dev, 134int __ir_input_register(struct input_dev *dev,
129 const struct ir_scancode_table *ir_codes, 135 const struct ir_scancode_table *ir_codes,
130 const struct ir_dev_props *props, 136 const struct ir_dev_props *props,
131 const char *driver_name); 137 const char *driver_name);
132void ir_input_unregister(struct input_dev *input_dev);
133 138
134/* Routines from rc-map.c */ 139static inline int ir_input_register(struct input_dev *dev,
140 const char *map_name,
141 const struct ir_dev_props *props,
142 const char *driver_name) {
143 struct ir_scancode_table *ir_codes;
135 144
136int ir_register_map(struct rc_keymap *map); 145 ir_codes = get_rc_map(map_name);
137void ir_unregister_map(struct rc_keymap *map); 146 if (!ir_codes)
138struct ir_scancode_table *get_rc_map(const char *name); 147 return -EINVAL;
148
149 return __ir_input_register(dev, ir_codes, props, driver_name);
150}
151
152 void ir_input_unregister(struct input_dev *input_dev);
139 153
140/* Routines from ir-sysfs.c */ 154/* Routines from ir-sysfs.c */
141 155