V4L/DVB (13537): ir: Prepare the code for dynamic keycode table allocation
Currently, the IR table is initialized by calling ir_input_init(). However,
this function doesn't return any error code, nor has a function to be called
when de-initializing the IR's.
Change the return argment to integer and make sure that each driver will
handle the error code. Also adds a function to free any resources that may
be allocating there: ir_input_free().
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
diff --git a/include/media/ir-common.h b/include/media/ir-common.h
index cd21cb5..16b8f17 100644
--- a/include/media/ir-common.h
+++ b/include/media/ir-common.h
@@ -100,7 +100,7 @@
/* Routines from ir-functions.c */
-void ir_input_init(struct input_dev *dev, struct ir_input_state *ir,
+int ir_input_init(struct input_dev *dev, struct ir_input_state *ir,
int ir_type, struct ir_scancode_table *ir_codes);
void ir_input_nokey(struct input_dev *dev, struct ir_input_state *ir);
void ir_input_keydown(struct input_dev *dev, struct ir_input_state *ir,
@@ -121,6 +121,7 @@
int ir_set_keycode_table(struct input_dev *input_dev,
struct ir_scancode_table *rc_tab);
+void ir_input_free(struct input_dev *input_dev);
/* scancode->keycode map tables from ir-keymaps.c */