diff options
Diffstat (limited to 'drivers/media/video/ir-kbd-i2c.c')
-rw-r--r-- | drivers/media/video/ir-kbd-i2c.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/media/video/ir-kbd-i2c.c b/drivers/media/video/ir-kbd-i2c.c index 9d8e78dc614e..b86e35386cee 100644 --- a/drivers/media/video/ir-kbd-i2c.c +++ b/drivers/media/video/ir-kbd-i2c.c | |||
@@ -438,7 +438,7 @@ static int ir_probe(struct i2c_client *client, const struct i2c_device_id *id) | |||
438 | dev_name(&client->dev)); | 438 | dev_name(&client->dev)); |
439 | 439 | ||
440 | /* init + register input device */ | 440 | /* init + register input device */ |
441 | err = ir_input_init(input_dev, &ir->ir, ir_type, ir->ir_codes); | 441 | err = ir_input_init(input_dev, &ir->ir, ir_type); |
442 | if (err < 0) | 442 | if (err < 0) |
443 | goto err_out_free; | 443 | goto err_out_free; |
444 | 444 | ||
@@ -446,7 +446,7 @@ static int ir_probe(struct i2c_client *client, const struct i2c_device_id *id) | |||
446 | input_dev->name = ir->name; | 446 | input_dev->name = ir->name; |
447 | input_dev->phys = ir->phys; | 447 | input_dev->phys = ir->phys; |
448 | 448 | ||
449 | err = input_register_device(ir->input); | 449 | err = ir_input_register(ir->input, ir->ir_codes); |
450 | if (err) | 450 | if (err) |
451 | goto err_out_free; | 451 | goto err_out_free; |
452 | 452 | ||
@@ -460,8 +460,6 @@ static int ir_probe(struct i2c_client *client, const struct i2c_device_id *id) | |||
460 | return 0; | 460 | return 0; |
461 | 461 | ||
462 | err_out_free: | 462 | err_out_free: |
463 | ir_input_unregister(input_dev); | ||
464 | input_free_device(input_dev); | ||
465 | kfree(ir); | 463 | kfree(ir); |
466 | return err; | 464 | return err; |
467 | } | 465 | } |
@@ -475,7 +473,6 @@ static int ir_remove(struct i2c_client *client) | |||
475 | 473 | ||
476 | /* unregister device */ | 474 | /* unregister device */ |
477 | ir_input_unregister(ir->input); | 475 | ir_input_unregister(ir->input); |
478 | input_unregister_device(ir->input); | ||
479 | 476 | ||
480 | /* free memory */ | 477 | /* free memory */ |
481 | kfree(ir); | 478 | kfree(ir); |