diff options
Diffstat (limited to 'drivers/media/video/ir-kbd-i2c.c')
-rw-r--r-- | drivers/media/video/ir-kbd-i2c.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/media/video/ir-kbd-i2c.c b/drivers/media/video/ir-kbd-i2c.c index 64360d26b32d..b86e35386cee 100644 --- a/drivers/media/video/ir-kbd-i2c.c +++ b/drivers/media/video/ir-kbd-i2c.c | |||
@@ -353,6 +353,7 @@ static int ir_probe(struct i2c_client *client, const struct i2c_device_id *id) | |||
353 | ir_type = IR_TYPE_RC5; | 353 | ir_type = IR_TYPE_RC5; |
354 | ir_codes = &ir_codes_fusionhdtv_mce_table; | 354 | ir_codes = &ir_codes_fusionhdtv_mce_table; |
355 | break; | 355 | break; |
356 | case 0x0b: | ||
356 | case 0x47: | 357 | case 0x47: |
357 | case 0x71: | 358 | case 0x71: |
358 | if (adap->id == I2C_HW_B_CX2388x || | 359 | if (adap->id == I2C_HW_B_CX2388x || |
@@ -422,7 +423,7 @@ static int ir_probe(struct i2c_client *client, const struct i2c_device_id *id) | |||
422 | 423 | ||
423 | /* Make sure we are all setup before going on */ | 424 | /* Make sure we are all setup before going on */ |
424 | if (!name || !ir->get_key || !ir_type || !ir_codes) { | 425 | if (!name || !ir->get_key || !ir_type || !ir_codes) { |
425 | dprintk(1, DEVNAME ": Unsupported device at address 0x%02x\n", | 426 | dprintk(1, ": Unsupported device at address 0x%02x\n", |
426 | addr); | 427 | addr); |
427 | err = -ENODEV; | 428 | err = -ENODEV; |
428 | goto err_out_free; | 429 | goto err_out_free; |
@@ -437,7 +438,7 @@ static int ir_probe(struct i2c_client *client, const struct i2c_device_id *id) | |||
437 | dev_name(&client->dev)); | 438 | dev_name(&client->dev)); |
438 | 439 | ||
439 | /* init + register input device */ | 440 | /* init + register input device */ |
440 | err = ir_input_init(input_dev, &ir->ir, ir_type, ir->ir_codes); | 441 | err = ir_input_init(input_dev, &ir->ir, ir_type); |
441 | if (err < 0) | 442 | if (err < 0) |
442 | goto err_out_free; | 443 | goto err_out_free; |
443 | 444 | ||
@@ -445,7 +446,7 @@ static int ir_probe(struct i2c_client *client, const struct i2c_device_id *id) | |||
445 | input_dev->name = ir->name; | 446 | input_dev->name = ir->name; |
446 | input_dev->phys = ir->phys; | 447 | input_dev->phys = ir->phys; |
447 | 448 | ||
448 | err = input_register_device(ir->input); | 449 | err = ir_input_register(ir->input, ir->ir_codes); |
449 | if (err) | 450 | if (err) |
450 | goto err_out_free; | 451 | goto err_out_free; |
451 | 452 | ||
@@ -459,8 +460,6 @@ static int ir_probe(struct i2c_client *client, const struct i2c_device_id *id) | |||
459 | return 0; | 460 | return 0; |
460 | 461 | ||
461 | err_out_free: | 462 | err_out_free: |
462 | ir_input_free(input_dev); | ||
463 | input_free_device(input_dev); | ||
464 | kfree(ir); | 463 | kfree(ir); |
465 | return err; | 464 | return err; |
466 | } | 465 | } |
@@ -473,8 +472,7 @@ static int ir_remove(struct i2c_client *client) | |||
473 | cancel_delayed_work_sync(&ir->work); | 472 | cancel_delayed_work_sync(&ir->work); |
474 | 473 | ||
475 | /* unregister device */ | 474 | /* unregister device */ |
476 | ir_input_free(ir->input); | 475 | ir_input_unregister(ir->input); |
477 | input_unregister_device(ir->input); | ||
478 | 476 | ||
479 | /* free memory */ | 477 | /* free memory */ |
480 | kfree(ir); | 478 | kfree(ir); |