diff options
author | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-08-07 12:10:25 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-08-21 16:25:05 -0400 |
commit | ff346b0f5d86688baf7c191faf192e69cf347583 (patch) | |
tree | d4d123db5b6ccf3473e3ffc876a2739295678ea3 | |
parent | f5885f40976bc8c8cb8fa17616ccc423f6daae04 (diff) |
[media] au0828: add an option to disable IR via modprobe parameter
The IR code increases the power consumption of the device.
Allow to disable it via modprobe parameter.
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
-rw-r--r-- | drivers/media/usb/au0828/au0828-input.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/media/usb/au0828/au0828-input.c b/drivers/media/usb/au0828/au0828-input.c index 39ddf3c4fdfe..590f99d02c93 100644 --- a/drivers/media/usb/au0828/au0828-input.c +++ b/drivers/media/usb/au0828/au0828-input.c | |||
@@ -25,6 +25,10 @@ | |||
25 | #include <linux/slab.h> | 25 | #include <linux/slab.h> |
26 | #include <media/rc-core.h> | 26 | #include <media/rc-core.h> |
27 | 27 | ||
28 | static int disable_ir; | ||
29 | module_param(disable_ir, int, 0444); | ||
30 | MODULE_PARM_DESC(disable_ir, "disable infrared remote support"); | ||
31 | |||
28 | #include "au0828.h" | 32 | #include "au0828.h" |
29 | 33 | ||
30 | struct au0828_rc { | 34 | struct au0828_rc { |
@@ -271,7 +275,7 @@ int au0828_rc_register(struct au0828_dev *dev) | |||
271 | int err = -ENOMEM; | 275 | int err = -ENOMEM; |
272 | u16 i2c_rc_dev_addr = 0; | 276 | u16 i2c_rc_dev_addr = 0; |
273 | 277 | ||
274 | if (!dev->board.has_ir_i2c) | 278 | if (!dev->board.has_ir_i2c || disable_ir) |
275 | return 0; | 279 | return 0; |
276 | 280 | ||
277 | i2c_rc_dev_addr = au0828_probe_i2c_ir(dev); | 281 | i2c_rc_dev_addr = au0828_probe_i2c_ir(dev); |