diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-04-02 13:18:42 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-05-19 12:56:50 -0300 |
commit | b2245ba1644eb1eba400fd04c6e7bb3ab2d4a8fa (patch) | |
tree | 0b0213d19f51cd6cda191a91b970fa1fcc1d49b9 /include/media | |
parent | 6686fa6917caaaaf3d595df6accedb87607517c9 (diff) | |
download | kernel_samsung_espresso10-b2245ba1644eb1eba400fd04c6e7bb3ab2d4a8fa.zip kernel_samsung_espresso10-b2245ba1644eb1eba400fd04c6e7bb3ab2d4a8fa.tar.gz kernel_samsung_espresso10-b2245ba1644eb1eba400fd04c6e7bb3ab2d4a8fa.tar.bz2 |
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.h | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/include/media/ir-core.h b/include/media/ir-core.h index 39df3cf..8e975f2 100644 --- a/include/media/ir-core.h +++ b/include/media/ir-core.h @@ -119,23 +119,37 @@ EXPORT_SYMBOL_GPL(IR_KEYTABLE(tabname)) #define DEFINE_LEGACY_IR_KEYTABLE(tabname) \ DEFINE_IR_KEYTABLE(tabname, IR_TYPE_UNKNOWN) +/* Routines from rc-map.c */ + +int ir_register_map(struct rc_keymap *map); +void ir_unregister_map(struct rc_keymap *map); +struct ir_scancode_table *get_rc_map(const char *name); + /* Routines from ir-keytable.c */ u32 ir_g_keycode_from_table(struct input_dev *input_dev, u32 scancode); void ir_keyup(struct input_dev *dev); void ir_keydown(struct input_dev *dev, int scancode); -int ir_input_register(struct input_dev *dev, +int __ir_input_register(struct input_dev *dev, const struct ir_scancode_table *ir_codes, const struct ir_dev_props *props, const char *driver_name); -void ir_input_unregister(struct input_dev *input_dev); -/* Routines from rc-map.c */ +static inline int ir_input_register(struct input_dev *dev, + const char *map_name, + const struct ir_dev_props *props, + const char *driver_name) { + struct ir_scancode_table *ir_codes; -int ir_register_map(struct rc_keymap *map); -void ir_unregister_map(struct rc_keymap *map); -struct ir_scancode_table *get_rc_map(const char *name); + ir_codes = get_rc_map(map_name); + if (!ir_codes) + return -EINVAL; + + return __ir_input_register(dev, ir_codes, props, driver_name); +} + + void ir_input_unregister(struct input_dev *input_dev); /* Routines from ir-sysfs.c */ |