diff mbox

[1/2,media] rc: Allow specifying properties for i2c IR's

Message ID 20101111113314.505c9e05@pedra (mailing list archive)
State Superseded
Headers show

Commit Message

Mauro Carvalho Chehab Nov. 11, 2010, 1:33 p.m. UTC
None
diff mbox

Patch

diff --git a/drivers/media/video/ir-kbd-i2c.c b/drivers/media/video/ir-kbd-i2c.c
index aee8943..82834ea 100644
--- a/drivers/media/video/ir-kbd-i2c.c
+++ b/drivers/media/video/ir-kbd-i2c.c
@@ -270,6 +270,7 @@  static int ir_probe(struct i2c_client *client, const struct i2c_device_id *id)
 {
 	char *ir_codes = NULL;
 	const char *name = NULL;
+	struct ir_dev_props *props = NULL;
 	u64 ir_type = IR_TYPE_UNKNOWN;
 	struct IR_i2c *ir;
 	struct input_dev *input_dev;
@@ -337,6 +338,7 @@  static int ir_probe(struct i2c_client *client, const struct i2c_device_id *id)
 		name = init_data->name;
 		if (init_data->type)
 			ir_type = init_data->type;
+		props = init_data->props;
 
 		if (init_data->polling_interval)
 			ir->polling_interval = init_data->polling_interval;
@@ -388,7 +390,7 @@  static int ir_probe(struct i2c_client *client, const struct i2c_device_id *id)
 	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, props, MODULE_NAME);
 	if (err)
 		goto err_out_free;
 
diff --git a/include/media/ir-kbd-i2c.h b/include/media/ir-kbd-i2c.h
index 8c37b5e..19ea5fa 100644
--- a/include/media/ir-kbd-i2c.h
+++ b/include/media/ir-kbd-i2c.h
@@ -47,5 +47,7 @@  struct IR_i2c_init_data {
 	 */
 	int                    (*get_key)(struct IR_i2c*, u32*, u32*);
 	enum ir_kbd_get_key_fn internal_get_key_func;
+
+	struct ir_dev_props    *props;
 };
 #endif