aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/IR/imon.c
diff options
context:
space:
mode:
authorJarod Wilson <jarod@redhat.com>2010-04-28 13:37:29 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-05-19 11:58:26 -0400
commit666a9ed8971657ea7dcf0bd9df17195db4dddf29 (patch)
tree4c69fc95f27a421afec6434df75152999421704c /drivers/media/IR/imon.c
parent96c1f99621a73c58f97d7ca615b2fe936abda555 (diff)
V4L/DVB: IR/imon: minor change_protocol fixups
This is a follow-up to my prior patch implementing ir-core's change_protocol functionality in the imon driver, which eliminates a false warning when change_protocol is called without a specific protocol selected yet (i.e., still IR_TYPE_UNKNOWN). It also removes some extraneous blank lines getting spewn into dmesg. Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/IR/imon.c')
-rw-r--r--drivers/media/IR/imon.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/drivers/media/IR/imon.c b/drivers/media/IR/imon.c
index b65c31ab4a4f..f5fb08fba637 100644
--- a/drivers/media/IR/imon.c
+++ b/drivers/media/IR/imon.c
@@ -999,7 +999,7 @@ int imon_ir_change_protocol(void *priv, u64 ir_type)
999 unsigned char ir_proto_packet[] = { 999 unsigned char ir_proto_packet[] = {
1000 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x86 }; 1000 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x86 };
1001 1001
1002 if (!(ir_type & ictx->props->allowed_protos)) 1002 if (ir_type && !(ir_type & ictx->props->allowed_protos))
1003 dev_warn(dev, "Looks like you're trying to use an IR protocol " 1003 dev_warn(dev, "Looks like you're trying to use an IR protocol "
1004 "this device does not support\n"); 1004 "this device does not support\n");
1005 1005
@@ -1014,12 +1014,11 @@ int imon_ir_change_protocol(void *priv, u64 ir_type)
1014 break; 1014 break;
1015 case IR_TYPE_UNKNOWN: 1015 case IR_TYPE_UNKNOWN:
1016 case IR_TYPE_OTHER: 1016 case IR_TYPE_OTHER:
1017 dev_dbg(dev, "Configuring IR receiver for iMON protocol"); 1017 dev_dbg(dev, "Configuring IR receiver for iMON protocol\n");
1018 if (pad_stabilize) { 1018 if (pad_stabilize)
1019 printk(KERN_CONT "\n");
1020 pad_mouse = true; 1019 pad_mouse = true;
1021 } else { 1020 else {
1022 printk(KERN_CONT " (without PAD stabilization)\n"); 1021 dev_dbg(dev, "PAD stabilize functionality disabled\n");
1023 pad_mouse = false; 1022 pad_mouse = false;
1024 } 1023 }
1025 /* ir_proto_packet[0] = 0x00; // already the default */ 1024 /* ir_proto_packet[0] = 0x00; // already the default */
@@ -1027,12 +1026,11 @@ int imon_ir_change_protocol(void *priv, u64 ir_type)
1027 break; 1026 break;
1028 default: 1027 default:
1029 dev_warn(dev, "Unsupported IR protocol specified, overriding " 1028 dev_warn(dev, "Unsupported IR protocol specified, overriding "
1030 "to iMON IR protocol"); 1029 "to iMON IR protocol\n");
1031 if (pad_stabilize) { 1030 if (pad_stabilize)
1032 printk(KERN_CONT "\n");
1033 pad_mouse = true; 1031 pad_mouse = true;
1034 } else { 1032 else {
1035 printk(KERN_CONT " (without PAD stabilization)\n"); 1033 dev_dbg(dev, "PAD stabilize functionality disabled\n");
1036 pad_mouse = false; 1034 pad_mouse = false;
1037 } 1035 }
1038 /* ir_proto_packet[0] = 0x00; // already the default */ 1036 /* ir_proto_packet[0] = 0x00; // already the default */