diff mbox

hid: put the case in the right switch statement

Message ID 20121025143512.17155.56181.stgit@localhost.localdomain (mailing list archive)
State New, archived
Delegated to: Jiri Kosina
Headers show

Commit Message

Alan Cox Oct. 25, 2012, 2:35 p.m. UTC
From: Alan Cox <alan@linux.intel.com>

Signed-off-by: Alan Cox <alan@linux.intel.com>
---

 drivers/hid/hid-multitouch.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


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

Comments

Benjamin Tissoires Oct. 25, 2012, 5:08 p.m. UTC | #1
Hi Alan,

Yes, I saw that too.

Acked-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>

On Thu, Oct 25, 2012 at 4:35 PM, Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:
> From: Alan Cox <alan@linux.intel.com>
>
> Signed-off-by: Alan Cox <alan@linux.intel.com>
> ---
>
>  drivers/hid/hid-multitouch.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c
> index 3eb02b9..c97011c 100644
> --- a/drivers/hid/hid-multitouch.c
> +++ b/drivers/hid/hid-multitouch.c
> @@ -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;
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-input" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Benjamin Tissoires Oct. 26, 2012, 8:29 a.m. UTC | #2
Adding Jiri to the recipient list of the patch, otherwise, the thread
may fall in the depth of his mailbox :)

Cheers,
Benjamin

On Thu, Oct 25, 2012 at 7:08 PM, Benjamin Tissoires
<benjamin.tissoires@gmail.com> wrote:
> Hi Alan,
>
> Yes, I saw that too.
>
> Acked-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
>
> On Thu, Oct 25, 2012 at 4:35 PM, Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:
>> From: Alan Cox <alan@linux.intel.com>
>>
>> Signed-off-by: Alan Cox <alan@linux.intel.com>
>> ---
>>
>>  drivers/hid/hid-multitouch.c |    2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c
>> index 3eb02b9..c97011c 100644
>> --- a/drivers/hid/hid-multitouch.c
>> +++ b/drivers/hid/hid-multitouch.c
>> @@ -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;
>>
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-input" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Jiri Kosina Oct. 26, 2012, 8:39 a.m. UTC | #3
On Fri, 26 Oct 2012, Benjamin Tissoires wrote:

> Adding Jiri to the recipient list of the patch, otherwise, the thread
> may fall in the depth of his mailbox :)
> 
> Cheers,
> Benjamin
> 
> On Thu, Oct 25, 2012 at 7:08 PM, Benjamin Tissoires
> <benjamin.tissoires@gmail.com> wrote:
> > Hi Alan,
> >
> > Yes, I saw that too.
> >
> > Acked-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
> >
> > On Thu, Oct 25, 2012 at 4:35 PM, Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:
> >> From: Alan Cox <alan@linux.intel.com>
> >>
> >> Signed-off-by: Alan Cox <alan@linux.intel.com>
> >> ---
> >>
> >>  drivers/hid/hid-multitouch.c |    2 +-
> >>  1 file changed, 1 insertion(+), 1 deletion(-)
> >>
> >> diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c
> >> index 3eb02b9..c97011c 100644
> >> --- a/drivers/hid/hid-multitouch.c
> >> +++ b/drivers/hid/hid-multitouch.c
> >> @@ -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;
> >>
> >>

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,
diff mbox

Patch

diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c
index 3eb02b9..c97011c 100644
--- a/drivers/hid/hid-multitouch.c
+++ b/drivers/hid/hid-multitouch.c
@@ -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;