diff options
author | Maxim Levitsky <maximlevitsky@gmail.com> | 2010-07-31 10:59:21 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-08-08 22:43:00 -0400 |
commit | b378f43fe9466e7712a8b16be64795ffca3a937e (patch) | |
tree | 72b73594094549d049f0dcdd653135f42e3f2b29 /include | |
parent | 86ff071cad3e7e4c7469b3941bfced6fe9b04b5f (diff) |
V4L/DVB: IR: Allow not to compile keymaps in
Currently, ir device registration fails if keymap requested by driver is not found.
Fix that by always compiling in the empty keymap, and using it as a failback.
Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com>
Acked-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/media/ir-core.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/include/media/ir-core.h b/include/media/ir-core.h index 513e60dd1010..197d05aa83dc 100644 --- a/include/media/ir-core.h +++ b/include/media/ir-core.h | |||
@@ -110,8 +110,12 @@ static inline int ir_input_register(struct input_dev *dev, | |||
110 | return -EINVAL; | 110 | return -EINVAL; |
111 | 111 | ||
112 | ir_codes = get_rc_map(map_name); | 112 | ir_codes = get_rc_map(map_name); |
113 | if (!ir_codes) | 113 | if (!ir_codes) { |
114 | return -EINVAL; | 114 | ir_codes = get_rc_map(RC_MAP_EMPTY); |
115 | |||
116 | if (!ir_codes) | ||
117 | return -EINVAL; | ||
118 | } | ||
115 | 119 | ||
116 | rc = __ir_input_register(dev, ir_codes, props, driver_name); | 120 | rc = __ir_input_register(dev, ir_codes, props, driver_name); |
117 | if (rc < 0) | 121 | if (rc < 0) |