diff options
-rw-r--r-- | drivers/media/video/ir-kbd-i2c.c | 14 | ||||
-rw-r--r-- | include/media/ir-kbd-i2c.h | 2 |
2 files changed, 5 insertions, 11 deletions
diff --git a/drivers/media/video/ir-kbd-i2c.c b/drivers/media/video/ir-kbd-i2c.c index 29d43974265..27ae8bbfb47 100644 --- a/drivers/media/video/ir-kbd-i2c.c +++ b/drivers/media/video/ir-kbd-i2c.c | |||
@@ -47,7 +47,7 @@ | |||
47 | #include <linux/i2c-id.h> | 47 | #include <linux/i2c-id.h> |
48 | #include <linux/workqueue.h> | 48 | #include <linux/workqueue.h> |
49 | 49 | ||
50 | #include <media/ir-common.h> | 50 | #include <media/ir-core.h> |
51 | #include <media/ir-kbd-i2c.h> | 51 | #include <media/ir-kbd-i2c.h> |
52 | 52 | ||
53 | /* ----------------------------------------------------------------------- */ | 53 | /* ----------------------------------------------------------------------- */ |
@@ -272,11 +272,8 @@ static void ir_key_poll(struct IR_i2c *ir) | |||
272 | return; | 272 | return; |
273 | } | 273 | } |
274 | 274 | ||
275 | if (0 == rc) { | 275 | if (rc) |
276 | ir_input_nokey(ir->input, &ir->ir); | 276 | ir_keydown(ir->input, ir_key, 0); |
277 | } else { | ||
278 | ir_input_keydown(ir->input, &ir->ir, ir_key); | ||
279 | } | ||
280 | } | 277 | } |
281 | 278 | ||
282 | static void ir_work(struct work_struct *work) | 279 | static void ir_work(struct work_struct *work) |
@@ -439,10 +436,7 @@ static int ir_probe(struct i2c_client *client, const struct i2c_device_id *id) | |||
439 | dev_name(&client->dev)); | 436 | dev_name(&client->dev)); |
440 | 437 | ||
441 | /* init + register input device */ | 438 | /* init + register input device */ |
442 | err = ir_input_init(input_dev, &ir->ir, ir_type); | 439 | ir->ir_type = ir_type; |
443 | if (err < 0) | ||
444 | goto err_out_free; | ||
445 | |||
446 | input_dev->id.bustype = BUS_I2C; | 440 | input_dev->id.bustype = BUS_I2C; |
447 | input_dev->name = ir->name; | 441 | input_dev->name = ir->name; |
448 | input_dev->phys = ir->phys; | 442 | input_dev->phys = ir->phys; |
diff --git a/include/media/ir-kbd-i2c.h b/include/media/ir-kbd-i2c.h index 0506e45c9a4..5e96d7a430b 100644 --- a/include/media/ir-kbd-i2c.h +++ b/include/media/ir-kbd-i2c.h | |||
@@ -11,7 +11,7 @@ struct IR_i2c { | |||
11 | struct i2c_client *c; | 11 | struct i2c_client *c; |
12 | struct input_dev *input; | 12 | struct input_dev *input; |
13 | struct ir_input_state ir; | 13 | struct ir_input_state ir; |
14 | 14 | u64 ir_type; | |
15 | /* Used to avoid fast repeating */ | 15 | /* Used to avoid fast repeating */ |
16 | unsigned char old; | 16 | unsigned char old; |
17 | 17 | ||