Skip to contentSkip to conversation

hid: put the case in the right switch statement

PATCH In review Alan Cox 3 participants 4 messages Oct 25, 2012 – Oct 26, 2012 3 messages not in the archive HID

lore
Share & tools
lore

Alan Cox

author
#0 lore raw

PATCH 1/1 hid: put the case in the right switch statement

From: Alan Cox <[email protected]>

---

 drivers/hid/hid-multitouch.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/hid/hid-multitouch.c +1 -1
index 3eb02b9..c97011c 100644
@@ -421,11 +421,11 @@ static int mt_input_mapping(struct hid_device *hdev, struct hid_input *hi,
 			 * contact max are global to the report */
 			td->last_field_index = field->index;
 			return -1;
-		}
 		case HID_DG_TOUCH:
 			/* Legacy devices use TIPSWITCH and not TOUCH.
 			 * Let's just ignore this field. */
 			return -1;
+		}
 		/* let hid-input decide for the others */
 		return 0;
 

A message that is not in the archive (sent off-list or not yet received): 20121025143512.17155.56181.stgit-bi+AKbBUZKY6gyzm1THtWbp2dZbC/[email protected]

#2 lore raw

Hi Alan,

Yes, I saw that too.

Quoted 27 lines · Alan Cox

From: Alan Cox <alan-VuQAYsv1563Yd54FQh9/[email protected]>

---

 drivers/hid/hid-multitouch.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/hid/hid-multitouch.c +1 -2
index 3eb02b9..c97011c 100644
@@ -421,11 +421,11 @@ static int mt_input_mapping(struct hid_device *hdev, struct hid_input *hi,
                         * contact max are global to the report */
                        td->last_field_index = field->index;
                        return -1;
-               }
                case HID_DG_TOUCH:
                        /* Legacy devices use TIPSWITCH and not TOUCH.
                         * Let's just ignore this field. */
                        return -1;
+               }
                /* let hid-input decide for the others */
                return 0;
 
 
--
Quoted 3 lines

To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): CAN+gG=GX8XSnURKpG4HCMU6tL_tVpPBVOwdr3ksyXrzkrsKL_g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org

#4 lore raw

Adding Jiri to the recipient list of the patch, otherwise, the thread may fall in the depth of his mailbox :)

Cheers,
Benjamin

Quoted 33 lines · Benjamin Tissoires

Hi Alan,

Yes, I saw that too.

Quoted 26 lines · Alan Cox

From: Alan Cox <alan-VuQAYsv1563Yd54FQh9/[email protected]>

---

 drivers/hid/hid-multitouch.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/hid/hid-multitouch.c +1 -1
index 3eb02b9..c97011c 100644
@@ -421,11 +421,11 @@ static int mt_input_mapping(struct hid_device *hdev, struct hid_input *hi,
                         * contact max are global to the report */
                        td->last_field_index = field->index;
                        return -1;
-               }
                case HID_DG_TOUCH:
                        /* Legacy devices use TIPSWITCH and not TOUCH.
                         * Let's just ignore this field. */
                        return -1;
+               }
                /* let hid-input decide for the others */
                return 0;
 
Quoted 4 lines
Quoted 4 lines

--
To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): CAN+gG=EsrqM745WOoNmU1ai4omEwRUjmUJBkLYG5UOgAFcaKYA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org

#6 lore raw
Quoted 33 lines · Benjamin Tissoires

Adding Jiri to the recipient list of the patch, otherwise, the thread may fall in the depth of his mailbox :)

Cheers,
Benjamin

Quoted 25 lines · Benjamin Tissoires

Hi Alan,

Yes, I saw that too.

Quoted 18 lines · Alan Cox

From: Alan Cox <alan-VuQAYsv1563Yd54FQh9/[email protected]>

---

 drivers/hid/hid-multitouch.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/hid/hid-multitouch.c +0 -1
index 3eb02b9..c97011c 100644
@@ -421,11 +421,11 @@ static int mt_input_mapping(struct hid_device *hdev, struct hid_input *hi,
                         * contact max are global to the report */
                        td->last_field_index = field->index;
                        return -1;
-               }
                case HID_DG_TOUCH:
Quoted 8 lines
Quoted 8 lines

drivers/hid/hid-multitouch.c static int mt_input_mapping(struct hid_device *hdev, struct hid_input *hi, · line 431

Quoted 8 lines
drivers/hid/hid-multitouch.c +1 -0
                        /* Legacy devices use TIPSWITCH and not TOUCH.
                         * Let's just ignore this field. */
                        return -1;
+               }
                /* let hid-input decide for the others */
                return 0;
 

Good catch, thanks. Applying.

Alan, please don't forget to CC proper maintainers on such patches. Patches tend to often get lost when sent only to mailinglists unfortunately.

Thanks,

Signature · 6 lines
Jiri Kosina
SUSE Labs
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html