Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[media] rc/imon: default to key mode instead of mouse mode

My initial thinking was that we should default to mouse mode, so people
could use the mouse function to click on something on a login screen,
but a lot of systems where a remote is useful automatically log in a
user and launch a media center application, some of which hide the
mouse, which can be confusing to users if they punch buttons on the
remote and don't see any feedback. Plus, first and foremost, its a
remote, so lets default to being a remote, and only toggle into mouse
mode when the user explicitly asks for it. As a nice side-effect, this
actually simplifies some of the code a fair bit...

Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

authored by

Jarod Wilson and committed by
Mauro Carvalho Chehab
76f1ef42 5aad7242

+4 -14
+4 -14
drivers/media/rc/imon.c
··· 988 988 int retval; 989 989 struct imon_context *ictx = rc->priv; 990 990 struct device *dev = ictx->dev; 991 - bool pad_mouse; 992 991 unsigned char ir_proto_packet[] = { 993 992 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x86 }; 994 993 ··· 999 1000 case RC_TYPE_RC6: 1000 1001 dev_dbg(dev, "Configuring IR receiver for MCE protocol\n"); 1001 1002 ir_proto_packet[0] = 0x01; 1002 - pad_mouse = false; 1003 1003 break; 1004 1004 case RC_TYPE_UNKNOWN: 1005 1005 case RC_TYPE_OTHER: 1006 1006 dev_dbg(dev, "Configuring IR receiver for iMON protocol\n"); 1007 - if (pad_stabilize && !nomouse) 1008 - pad_mouse = true; 1009 - else { 1007 + if (!pad_stabilize) 1010 1008 dev_dbg(dev, "PAD stabilize functionality disabled\n"); 1011 - pad_mouse = false; 1012 - } 1013 1009 /* ir_proto_packet[0] = 0x00; // already the default */ 1014 1010 rc_type = RC_TYPE_OTHER; 1015 1011 break; 1016 1012 default: 1017 1013 dev_warn(dev, "Unsupported IR protocol specified, overriding " 1018 1014 "to iMON IR protocol\n"); 1019 - if (pad_stabilize && !nomouse) 1020 - pad_mouse = true; 1021 - else { 1015 + if (!pad_stabilize) 1022 1016 dev_dbg(dev, "PAD stabilize functionality disabled\n"); 1023 - pad_mouse = false; 1024 - } 1025 1017 /* ir_proto_packet[0] = 0x00; // already the default */ 1026 1018 rc_type = RC_TYPE_OTHER; 1027 1019 break; ··· 1025 1035 goto out; 1026 1036 1027 1037 ictx->rc_type = rc_type; 1028 - ictx->pad_mouse = pad_mouse; 1038 + ictx->pad_mouse = false; 1029 1039 1030 1040 out: 1031 1041 return retval; ··· 1507 1517 spin_unlock_irqrestore(&ictx->kc_lock, flags); 1508 1518 return; 1509 1519 } else { 1510 - ictx->pad_mouse = 0; 1520 + ictx->pad_mouse = false; 1511 1521 dev_dbg(dev, "mouse mode disabled, passing key value\n"); 1512 1522 } 1513 1523 }