diff options
Diffstat (limited to 'drivers/media/video/cx88/cx88-input.c')
-rw-r--r-- | drivers/media/video/cx88/cx88-input.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/media/video/cx88/cx88-input.c b/drivers/media/video/cx88/cx88-input.c index 92b8cdf9fb8..f9fda18b410 100644 --- a/drivers/media/video/cx88/cx88-input.c +++ b/drivers/media/video/cx88/cx88-input.c | |||
@@ -360,7 +360,7 @@ int cx88_ir_init(struct cx88_core *core, struct pci_dev *pci) | |||
360 | snprintf(ir->name, sizeof(ir->name), "cx88 IR (%s)", core->board.name); | 360 | snprintf(ir->name, sizeof(ir->name), "cx88 IR (%s)", core->board.name); |
361 | snprintf(ir->phys, sizeof(ir->phys), "pci-%s/ir0", pci_name(pci)); | 361 | snprintf(ir->phys, sizeof(ir->phys), "pci-%s/ir0", pci_name(pci)); |
362 | 362 | ||
363 | err = ir_input_init(input_dev, &ir->ir, ir_type, ir_codes); | 363 | err = ir_input_init(input_dev, &ir->ir, ir_type); |
364 | if (err < 0) | 364 | if (err < 0) |
365 | goto err_out_free; | 365 | goto err_out_free; |
366 | 366 | ||
@@ -383,7 +383,7 @@ int cx88_ir_init(struct cx88_core *core, struct pci_dev *pci) | |||
383 | cx88_ir_start(core, ir); | 383 | cx88_ir_start(core, ir); |
384 | 384 | ||
385 | /* all done */ | 385 | /* all done */ |
386 | err = input_register_device(ir->input); | 386 | err = ir_input_register(ir->input, ir_codes); |
387 | if (err) | 387 | if (err) |
388 | goto err_out_stop; | 388 | goto err_out_stop; |
389 | 389 | ||
@@ -393,8 +393,6 @@ int cx88_ir_init(struct cx88_core *core, struct pci_dev *pci) | |||
393 | cx88_ir_stop(core, ir); | 393 | cx88_ir_stop(core, ir); |
394 | core->ir = NULL; | 394 | core->ir = NULL; |
395 | err_out_free: | 395 | err_out_free: |
396 | ir_input_free(input_dev); | ||
397 | input_free_device(input_dev); | ||
398 | kfree(ir); | 396 | kfree(ir); |
399 | return err; | 397 | return err; |
400 | } | 398 | } |
@@ -408,8 +406,7 @@ int cx88_ir_fini(struct cx88_core *core) | |||
408 | return 0; | 406 | return 0; |
409 | 407 | ||
410 | cx88_ir_stop(core, ir); | 408 | cx88_ir_stop(core, ir); |
411 | ir_input_free(ir->input); | 409 | ir_input_unregister(ir->input); |
412 | input_unregister_device(ir->input); | ||
413 | kfree(ir); | 410 | kfree(ir); |
414 | 411 | ||
415 | /* done */ | 412 | /* done */ |