summaryrefslogtreecommitdiffstats
path: root/include/media
diff options
context:
space:
mode:
Diffstat (limited to 'include/media')
-rw-r--r--include/media/ir-core.h8
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,
return -EINVAL;
ir_codes = get_rc_map(map_name);
- if (!ir_codes)
- return -EINVAL;
+ if (!ir_codes) {
+ ir_codes = get_rc_map(RC_MAP_EMPTY);
+
+ if (!ir_codes)
+ return -EINVAL;
+ }
rc = __ir_input_register(dev, ir_codes, props, driver_name);
if (rc < 0)
OpenPOWER on IntegriCloud