aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/bt8xx/bttv-input.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/bt8xx/bttv-input.c')
-rw-r--r--drivers/media/video/bt8xx/bttv-input.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/media/video/bt8xx/bttv-input.c b/drivers/media/video/bt8xx/bttv-input.c
index 0e1a7aabefba..277a092e1214 100644
--- a/drivers/media/video/bt8xx/bttv-input.c
+++ b/drivers/media/video/bt8xx/bttv-input.c
@@ -368,7 +368,7 @@ int bttv_input_init(struct bttv *btv)
368 snprintf(ir->phys, sizeof(ir->phys), "pci-%s/ir0", 368 snprintf(ir->phys, sizeof(ir->phys), "pci-%s/ir0",
369 pci_name(btv->c.pci)); 369 pci_name(btv->c.pci));
370 370
371 err = ir_input_init(input_dev, &ir->ir, ir_type, ir_codes); 371 err = ir_input_init(input_dev, &ir->ir, ir_type);
372 if (err < 0) 372 if (err < 0)
373 goto err_out_free; 373 goto err_out_free;
374 374
@@ -389,7 +389,7 @@ int bttv_input_init(struct bttv *btv)
389 bttv_ir_start(btv, ir); 389 bttv_ir_start(btv, ir);
390 390
391 /* all done */ 391 /* all done */
392 err = input_register_device(btv->remote->dev); 392 err = ir_input_register(btv->remote->dev, ir_codes);
393 if (err) 393 if (err)
394 goto err_out_stop; 394 goto err_out_stop;
395 395
@@ -403,8 +403,6 @@ int bttv_input_init(struct bttv *btv)
403 bttv_ir_stop(btv); 403 bttv_ir_stop(btv);
404 btv->remote = NULL; 404 btv->remote = NULL;
405 err_out_free: 405 err_out_free:
406 ir_input_unregister(input_dev);
407 input_free_device(input_dev);
408 kfree(ir); 406 kfree(ir);
409 return err; 407 return err;
410} 408}
@@ -416,7 +414,6 @@ void bttv_input_fini(struct bttv *btv)
416 414
417 bttv_ir_stop(btv); 415 bttv_ir_stop(btv);
418 ir_input_unregister(btv->remote->dev); 416 ir_input_unregister(btv->remote->dev);
419 input_unregister_device(btv->remote->dev);
420 kfree(btv->remote); 417 kfree(btv->remote);
421 btv->remote = NULL; 418 btv->remote = NULL;
422} 419}