diff options
author | Jarod Wilson <jarod@redhat.com> | 2011-01-06 14:59:35 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-01-19 08:45:53 -0500 |
commit | 76f1ef427c0aab3d3c917b497562ea2cdaaae056 (patch) | |
tree | 5ff24ec149883ee3369a7e731485d3bd486fbcfe /drivers/media/rc/imon.c | |
parent | 5aad724280b9f8ffff3a55311ef0ba35ebb4099a (diff) |
[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>
Diffstat (limited to 'drivers/media/rc/imon.c')
-rw-r--r-- | drivers/media/rc/imon.c | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/drivers/media/rc/imon.c b/drivers/media/rc/imon.c index 703420749243..e7dc6b46fdfa 100644 --- a/drivers/media/rc/imon.c +++ b/drivers/media/rc/imon.c | |||
@@ -988,7 +988,6 @@ static int imon_ir_change_protocol(struct rc_dev *rc, u64 rc_type) | |||
988 | int retval; | 988 | int retval; |
989 | struct imon_context *ictx = rc->priv; | 989 | struct imon_context *ictx = rc->priv; |
990 | struct device *dev = ictx->dev; | 990 | struct device *dev = ictx->dev; |
991 | bool pad_mouse; | ||
992 | unsigned char ir_proto_packet[] = { | 991 | unsigned char ir_proto_packet[] = { |
993 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x86 }; | 992 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x86 }; |
994 | 993 | ||
@@ -1000,29 +999,20 @@ static int imon_ir_change_protocol(struct rc_dev *rc, u64 rc_type) | |||
1000 | case RC_TYPE_RC6: | 999 | case RC_TYPE_RC6: |
1001 | dev_dbg(dev, "Configuring IR receiver for MCE protocol\n"); | 1000 | dev_dbg(dev, "Configuring IR receiver for MCE protocol\n"); |
1002 | ir_proto_packet[0] = 0x01; | 1001 | ir_proto_packet[0] = 0x01; |
1003 | pad_mouse = false; | ||
1004 | break; | 1002 | break; |
1005 | case RC_TYPE_UNKNOWN: | 1003 | case RC_TYPE_UNKNOWN: |
1006 | case RC_TYPE_OTHER: | 1004 | case RC_TYPE_OTHER: |
1007 | dev_dbg(dev, "Configuring IR receiver for iMON protocol\n"); | 1005 | dev_dbg(dev, "Configuring IR receiver for iMON protocol\n"); |
1008 | if (pad_stabilize && !nomouse) | 1006 | if (!pad_stabilize) |
1009 | pad_mouse = true; | ||
1010 | else { | ||
1011 | dev_dbg(dev, "PAD stabilize functionality disabled\n"); | 1007 | dev_dbg(dev, "PAD stabilize functionality disabled\n"); |
1012 | pad_mouse = false; | ||
1013 | } | ||
1014 | /* ir_proto_packet[0] = 0x00; // already the default */ | 1008 | /* ir_proto_packet[0] = 0x00; // already the default */ |
1015 | rc_type = RC_TYPE_OTHER; | 1009 | rc_type = RC_TYPE_OTHER; |
1016 | break; | 1010 | break; |
1017 | default: | 1011 | default: |
1018 | dev_warn(dev, "Unsupported IR protocol specified, overriding " | 1012 | dev_warn(dev, "Unsupported IR protocol specified, overriding " |
1019 | "to iMON IR protocol\n"); | 1013 | "to iMON IR protocol\n"); |
1020 | if (pad_stabilize && !nomouse) | 1014 | if (!pad_stabilize) |
1021 | pad_mouse = true; | ||
1022 | else { | ||
1023 | dev_dbg(dev, "PAD stabilize functionality disabled\n"); | 1015 | dev_dbg(dev, "PAD stabilize functionality disabled\n"); |
1024 | pad_mouse = false; | ||
1025 | } | ||
1026 | /* ir_proto_packet[0] = 0x00; // already the default */ | 1016 | /* ir_proto_packet[0] = 0x00; // already the default */ |
1027 | rc_type = RC_TYPE_OTHER; | 1017 | rc_type = RC_TYPE_OTHER; |
1028 | break; | 1018 | break; |
@@ -1035,7 +1025,7 @@ static int imon_ir_change_protocol(struct rc_dev *rc, u64 rc_type) | |||
1035 | goto out; | 1025 | goto out; |
1036 | 1026 | ||
1037 | ictx->rc_type = rc_type; | 1027 | ictx->rc_type = rc_type; |
1038 | ictx->pad_mouse = pad_mouse; | 1028 | ictx->pad_mouse = false; |
1039 | 1029 | ||
1040 | out: | 1030 | out: |
1041 | return retval; | 1031 | return retval; |
@@ -1517,7 +1507,7 @@ static void imon_incoming_packet(struct imon_context *ictx, | |||
1517 | spin_unlock_irqrestore(&ictx->kc_lock, flags); | 1507 | spin_unlock_irqrestore(&ictx->kc_lock, flags); |
1518 | return; | 1508 | return; |
1519 | } else { | 1509 | } else { |
1520 | ictx->pad_mouse = 0; | 1510 | ictx->pad_mouse = false; |
1521 | dev_dbg(dev, "mouse mode disabled, passing key value\n"); | 1511 | dev_dbg(dev, "mouse mode disabled, passing key value\n"); |
1522 | } | 1512 | } |
1523 | } | 1513 | } |