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>
 }
 
 /**
- * ir_input_register() - sets the IR keycode table and add the handlers
+ * __ir_input_register() - sets the IR keycode table and add the handlers
  *                         for keymap table get/set
  * @input_dev: the struct input_dev descriptor of the device
  * @rc_tab:    the struct ir_scancode_table table of scancode/keymap
  * It will register the input/evdev interface for the device and
  * register the syfs code for IR class
  */
-int ir_input_register(struct input_dev *input_dev,
+int __ir_input_register(struct input_dev *input_dev,
                      const struct ir_scancode_table *rc_tab,
                      const struct ir_dev_props *props,
                      const char *driver_name)
        kfree(ir_dev);
        return rc;
 }
-EXPORT_SYMBOL_GPL(ir_input_register);
+EXPORT_SYMBOL_GPL(__ir_input_register);
 
 /**
  * ir_input_unregister() - unregisters IR and frees resources
 
 
        INIT_WORK(&dm1105->ir.work, dm1105_emit_key);
 
-       err = ir_input_register(input_dev, ir_codes, NULL, MODULE_NAME);
+       err = __ir_input_register(input_dev, ir_codes, NULL, MODULE_NAME);
 
        return err;
 }
 
        rc->id.version  = 1;
        rc->dev         = mantis->pdev->dev;
 
-       err = ir_input_register(rc, &ir_mantis, NULL, MODULE_NAME);
+       err = __ir_input_register(rc, &ir_mantis, NULL, MODULE_NAME);
        if (err) {
                dprintk(MANTIS_ERROR, 1, "IR device registration failed, ret = %d", err);
                input_free_device(rc);
 
        budget_ci->ir.timer_keyup.function = msp430_ir_keyup;
        budget_ci->ir.timer_keyup.data = (unsigned long) &budget_ci->ir;
        budget_ci->ir.last_raw = 0xffff; /* An impossible value */
-       error = ir_input_register(input_dev, ir_codes, NULL, MODULE_NAME);
+       error = __ir_input_register(input_dev, ir_codes, NULL, MODULE_NAME);
        if (error) {
                printk(KERN_ERR "budget_ci: could not init driver for IR device (code %d)\n", error);
                return error;
 
        bttv_ir_start(btv, ir);
 
        /* all done */
-       err = ir_input_register(btv->remote->dev, ir_codes, NULL, MODULE_NAME);
+       err = __ir_input_register(btv->remote->dev, ir_codes, NULL, MODULE_NAME);
        if (err)
                goto err_out_stop;
 
 
        cx231xx_ir_start(ir);
 
        /* all done */
-       err = ir_input_register(ir->input, dev->board.ir_codes,
+       err = __ir_input_register(ir->input, dev->board.ir_codes,
                                NULL, MODULE_NAME);
        if (err)
                goto err_out_stop;
 
        dev->ir_input = ir;
        cx23885_input_ir_start(dev);
 
-       ret = ir_input_register(ir->dev, ir_codes, NULL, MODULE_NAME);
+       ret = __ir_input_register(ir->dev, ir_codes, NULL, MODULE_NAME);
        if (ret)
                goto err_out_stop;
 
 
        ir->props.close = cx88_ir_close;
 
        /* all done */
-       err = ir_input_register(ir->input, ir_codes, &ir->props, MODULE_NAME);
+       err = __ir_input_register(ir->input, ir_codes, &ir->props, MODULE_NAME);
        if (err)
                goto err_out_free;
 
 
        em28xx_ir_start(ir);
 
        /* all done */
-       err = ir_input_register(ir->input, dev->board.ir_codes,
+       err = __ir_input_register(ir->input, dev->board.ir_codes,
                                &ir->props, MODULE_NAME);
        if (err)
                goto err_out_stop;
 
        input_dev->name       = ir->name;
        input_dev->phys       = ir->phys;
 
-       err = ir_input_register(ir->input, ir->ir_codes, NULL, MODULE_NAME);
+       err = __ir_input_register(ir->input, ir->ir_codes, NULL, MODULE_NAME);
        if (err)
                goto err_out_free;
 
 
        }
        input_dev->dev.parent = &dev->pci->dev;
 
-       err = ir_input_register(ir->dev, ir_codes, &ir->props, MODULE_NAME);
+       err = __ir_input_register(ir->dev, ir_codes, &ir->props, MODULE_NAME);
        if (err)
                goto err_out_free;
        if (ir_codes->ir_type != IR_TYPE_OTHER) {
 
 #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 */