aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx23885/cx23885-input.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/cx23885/cx23885-input.c')
-rw-r--r--drivers/media/video/cx23885/cx23885-input.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/media/video/cx23885/cx23885-input.c b/drivers/media/video/cx23885/cx23885-input.c
index 469e083dd5f..768eec92ccf 100644
--- a/drivers/media/video/cx23885/cx23885-input.c
+++ b/drivers/media/video/cx23885/cx23885-input.c
@@ -377,7 +377,7 @@ int cx23885_input_init(struct cx23885_dev *dev)
377 cx23885_boards[dev->board].name); 377 cx23885_boards[dev->board].name);
378 snprintf(ir->phys, sizeof(ir->phys), "pci-%s/ir0", pci_name(dev->pci)); 378 snprintf(ir->phys, sizeof(ir->phys), "pci-%s/ir0", pci_name(dev->pci));
379 379
380 ret = ir_input_init(input_dev, &ir->ir, ir_type, ir_codes); 380 ret = ir_input_init(input_dev, &ir->ir, ir_type);
381 if (ret < 0) 381 if (ret < 0)
382 goto err_out_free; 382 goto err_out_free;
383 383
@@ -397,7 +397,7 @@ int cx23885_input_init(struct cx23885_dev *dev)
397 dev->ir_input = ir; 397 dev->ir_input = ir;
398 cx23885_input_ir_start(dev); 398 cx23885_input_ir_start(dev);
399 399
400 ret = input_register_device(ir->dev); 400 ret = ir_input_register(ir->dev, ir_codes);
401 if (ret) 401 if (ret)
402 goto err_out_stop; 402 goto err_out_stop;
403 403
@@ -407,8 +407,6 @@ err_out_stop:
407 cx23885_input_ir_stop(dev); 407 cx23885_input_ir_stop(dev);
408 dev->ir_input = NULL; 408 dev->ir_input = NULL;
409err_out_free: 409err_out_free:
410 ir_input_free(input_dev);
411 input_free_device(input_dev);
412 kfree(ir); 410 kfree(ir);
413 return ret; 411 return ret;
414} 412}
@@ -420,8 +418,7 @@ void cx23885_input_fini(struct cx23885_dev *dev)
420 418
421 if (dev->ir_input == NULL) 419 if (dev->ir_input == NULL)
422 return; 420 return;
423 ir_input_free(dev->ir_input->dev); 421 ir_input_unregister(dev->ir_input->dev);
424 input_unregister_device(dev->ir_input->dev);
425 kfree(dev->ir_input); 422 kfree(dev->ir_input);
426 dev->ir_input = NULL; 423 dev->ir_input = NULL;
427} 424}