diff options
-rw-r--r-- | drivers/media/usb/em28xx/em28xx-input.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/drivers/media/usb/em28xx/em28xx-input.c b/drivers/media/usb/em28xx/em28xx-input.c index 3598221378ac..2a1b3d277db1 100644 --- a/drivers/media/usb/em28xx/em28xx-input.c +++ b/drivers/media/usb/em28xx/em28xx-input.c | |||
@@ -590,6 +590,17 @@ static int em28xx_ir_init(struct em28xx *dev) | |||
590 | int err = -ENOMEM; | 590 | int err = -ENOMEM; |
591 | u64 rc_type; | 591 | u64 rc_type; |
592 | 592 | ||
593 | if (dev->board.has_snapshot_button) | ||
594 | em28xx_register_snapshot_button(dev); | ||
595 | |||
596 | if (dev->board.has_ir_i2c) { | ||
597 | em28xx_register_i2c_ir(dev); | ||
598 | #if defined(CONFIG_MODULES) && defined(MODULE) | ||
599 | request_module("ir-kbd-i2c"); | ||
600 | #endif | ||
601 | return 0; | ||
602 | } | ||
603 | |||
593 | if (dev->board.ir_codes == NULL) { | 604 | if (dev->board.ir_codes == NULL) { |
594 | /* No remote control support */ | 605 | /* No remote control support */ |
595 | em28xx_warn("Remote control support is not available for " | 606 | em28xx_warn("Remote control support is not available for " |
@@ -663,15 +674,6 @@ static int em28xx_ir_init(struct em28xx *dev) | |||
663 | if (err) | 674 | if (err) |
664 | goto error; | 675 | goto error; |
665 | 676 | ||
666 | em28xx_register_i2c_ir(dev); | ||
667 | |||
668 | #if defined(CONFIG_MODULES) && defined(MODULE) | ||
669 | if (dev->board.has_ir_i2c) | ||
670 | request_module("ir-kbd-i2c"); | ||
671 | #endif | ||
672 | if (dev->board.has_snapshot_button) | ||
673 | em28xx_register_snapshot_button(dev); | ||
674 | |||
675 | return 0; | 677 | return 0; |
676 | 678 | ||
677 | error: | 679 | error: |