diff options
author | Ezequiel GarcĂa <elezegarcia@gmail.com> | 2012-03-26 09:13:32 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-04-10 20:41:39 -0300 |
commit | 2fd6f8d15371686e3fee87d6119cab9bc4d76349 (patch) | |
tree | 4ecf022b24d5fdda0d915f0034bc6aded16d07aa /drivers/media/video/em28xx/em28xx-input.c | |
parent | 37e65dceccf1b556afc17328fbdd782693807af9 (diff) |
[media] em28xx: Move ir/rc related initialization to em28xx_ir_init()
Moving this helps isolating em28xx_input and will help
converting it into a separate module.
Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/em28xx/em28xx-input.c')
-rw-r--r-- | drivers/media/video/em28xx/em28xx-input.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/media/video/em28xx/em28xx-input.c b/drivers/media/video/em28xx/em28xx-input.c index 2630b265b0e8..dd6e3f2dfba9 100644 --- a/drivers/media/video/em28xx/em28xx-input.c +++ b/drivers/media/video/em28xx/em28xx-input.c @@ -448,6 +448,15 @@ int em28xx_ir_init(struct em28xx *dev) if (err) goto err_out_stop; + em28xx_register_i2c_ir(dev); + +#if defined(CONFIG_MODULES) && defined(MODULE) + if (dev->board.has_ir_i2c) + request_module("ir-kbd-i2c"); +#endif + if (dev->board.has_snapshot_button) + em28xx_register_snapshot_button(dev); + return 0; err_out_stop: @@ -462,6 +471,8 @@ int em28xx_ir_fini(struct em28xx *dev) { struct em28xx_IR *ir = dev->ir; + em28xx_deregister_snapshot_button(dev); + /* skip detach on non attached boards */ if (!ir) return 0; |