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>
This commit is contained in:
Jarod Wilson 2010-04-28 14:37:29 -03:00 committed by Mauro Carvalho Chehab
parent 96c1f99621
commit 666a9ed897

View file

@ -999,7 +999,7 @@ int imon_ir_change_protocol(void *priv, u64 ir_type)
unsigned char ir_proto_packet[] = { unsigned char ir_proto_packet[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x86 }; 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x86 };
if (!(ir_type & ictx->props->allowed_protos)) if (ir_type && !(ir_type & ictx->props->allowed_protos))
dev_warn(dev, "Looks like you're trying to use an IR protocol " dev_warn(dev, "Looks like you're trying to use an IR protocol "
"this device does not support\n"); "this device does not support\n");
@ -1014,12 +1014,11 @@ int imon_ir_change_protocol(void *priv, u64 ir_type)
break; break;
case IR_TYPE_UNKNOWN: case IR_TYPE_UNKNOWN:
case IR_TYPE_OTHER: case IR_TYPE_OTHER:
dev_dbg(dev, "Configuring IR receiver for iMON protocol"); dev_dbg(dev, "Configuring IR receiver for iMON protocol\n");
if (pad_stabilize) { if (pad_stabilize)
printk(KERN_CONT "\n");
pad_mouse = true; pad_mouse = true;
} else { else {
printk(KERN_CONT " (without PAD stabilization)\n"); dev_dbg(dev, "PAD stabilize functionality disabled\n");
pad_mouse = false; pad_mouse = false;
} }
/* ir_proto_packet[0] = 0x00; // already the default */ /* ir_proto_packet[0] = 0x00; // already the default */
@ -1027,12 +1026,11 @@ int imon_ir_change_protocol(void *priv, u64 ir_type)
break; break;
default: default:
dev_warn(dev, "Unsupported IR protocol specified, overriding " dev_warn(dev, "Unsupported IR protocol specified, overriding "
"to iMON IR protocol"); "to iMON IR protocol\n");
if (pad_stabilize) { if (pad_stabilize)
printk(KERN_CONT "\n");
pad_mouse = true; pad_mouse = true;
} else { else {
printk(KERN_CONT " (without PAD stabilization)\n"); dev_dbg(dev, "PAD stabilize functionality disabled\n");
pad_mouse = false; pad_mouse = false;
} }
/* ir_proto_packet[0] = 0x00; // already the default */ /* ir_proto_packet[0] = 0x00; // already the default */