diff options
Diffstat (limited to 'drivers/media/video/em28xx/em28xx-input.c')
-rw-r--r-- | drivers/media/video/em28xx/em28xx-input.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/media/video/em28xx/em28xx-input.c b/drivers/media/video/em28xx/em28xx-input.c index 9dc4e142726b..af0d935c29be 100644 --- a/drivers/media/video/em28xx/em28xx-input.c +++ b/drivers/media/video/em28xx/em28xx-input.c | |||
@@ -393,8 +393,7 @@ int em28xx_ir_init(struct em28xx *dev) | |||
393 | usb_make_path(dev->udev, ir->phys, sizeof(ir->phys)); | 393 | usb_make_path(dev->udev, ir->phys, sizeof(ir->phys)); |
394 | strlcat(ir->phys, "/input0", sizeof(ir->phys)); | 394 | strlcat(ir->phys, "/input0", sizeof(ir->phys)); |
395 | 395 | ||
396 | err = ir_input_init(input_dev, &ir->ir, IR_TYPE_OTHER, | 396 | err = ir_input_init(input_dev, &ir->ir, IR_TYPE_OTHER); |
397 | dev->board.ir_codes); | ||
398 | if (err < 0) | 397 | if (err < 0) |
399 | goto err_out_free; | 398 | goto err_out_free; |
400 | 399 | ||
@@ -413,7 +412,7 @@ int em28xx_ir_init(struct em28xx *dev) | |||
413 | em28xx_ir_start(ir); | 412 | em28xx_ir_start(ir); |
414 | 413 | ||
415 | /* all done */ | 414 | /* all done */ |
416 | err = input_register_device(ir->input); | 415 | err = ir_input_register(ir->input, dev->board.ir_codes); |
417 | if (err) | 416 | if (err) |
418 | goto err_out_stop; | 417 | goto err_out_stop; |
419 | 418 | ||
@@ -422,8 +421,6 @@ int em28xx_ir_init(struct em28xx *dev) | |||
422 | em28xx_ir_stop(ir); | 421 | em28xx_ir_stop(ir); |
423 | dev->ir = NULL; | 422 | dev->ir = NULL; |
424 | err_out_free: | 423 | err_out_free: |
425 | ir_input_unregister(input_dev); | ||
426 | input_free_device(input_dev); | ||
427 | kfree(ir); | 424 | kfree(ir); |
428 | return err; | 425 | return err; |
429 | } | 426 | } |
@@ -438,7 +435,6 @@ int em28xx_ir_fini(struct em28xx *dev) | |||
438 | 435 | ||
439 | em28xx_ir_stop(ir); | 436 | em28xx_ir_stop(ir); |
440 | ir_input_unregister(ir->input); | 437 | ir_input_unregister(ir->input); |
441 | input_unregister_device(ir->input); | ||
442 | kfree(ir); | 438 | kfree(ir); |
443 | 439 | ||
444 | /* done */ | 440 | /* done */ |