diff mbox

[3/3,v2] input : wacom - Cleanup a return value for the old Bamboo

Message ID 1309908360-18866-1-git-send-email-pinglinux@gmail.com (mailing list archive)
State Accepted
Commit 84460014505685ab234fa8e1a45dffd32f3a46a7
Headers show

Commit Message

Ping Cheng July 5, 2011, 11:26 p.m. UTC
The old code may call input_sync without sending any other events.
Although the sync event will be ignored in the userland, eliminating
unnecessary kernel events is the right way to go.

Signed-off-by: Ping Cheng <pingc@wacom.com>
---
 drivers/input/tablet/wacom_wac.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

chris@cnpbagwell.com July 6, 2011, 2:34 a.m. UTC | #1
On Tue, Jul 5, 2011 at 6:26 PM, Ping Cheng <pinglinux@gmail.com> wrote:
> The old code may call input_sync without sending any other events.
> Although the sync event will be ignored in the userland, eliminating
> unnecessary kernel events is the right way to go.

Aligns the code block with previous case statement as well.

Reviewed-by: Chris Bagwell <chris@cnpbagwell.com>

>
> Signed-off-by: Ping Cheng <pingc@wacom.com>
> ---
>  drivers/input/tablet/wacom_wac.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/input/tablet/wacom_wac.c b/drivers/input/tablet/wacom_wac.c
> index 19554a4..03ebcc8 100644
> --- a/drivers/input/tablet/wacom_wac.c
> +++ b/drivers/input/tablet/wacom_wac.c
> @@ -300,8 +300,8 @@ static int wacom_graphire_irq(struct wacom_wac *wacom)
>                                wacom->id[1] = 0;
>                        input_report_abs(input, ABS_MISC, wacom->id[1]);
>                        input_event(input, EV_MSC, MSC_SERIAL, 0xf0);
> +                       retval = 1;
>                }
> -               retval = 1;
>                break;
>        }
>  exit:
> --
> 1.7.5.4
>
> --
> 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
Henrik Rydberg July 6, 2011, 5:52 a.m. UTC | #2
On Tue, Jul 05, 2011 at 09:34:08PM -0500, Chris Bagwell wrote:
> On Tue, Jul 5, 2011 at 6:26 PM, Ping Cheng <pinglinux@gmail.com> wrote:
> > The old code may call input_sync without sending any other events.
> > Although the sync event will be ignored in the userland, eliminating
> > unnecessary kernel events is the right way to go.
> 
> Aligns the code block with previous case statement as well.
> 
> Reviewed-by: Chris Bagwell <chris@cnpbagwell.com>

The sync will not even reach userland, but the patch wont hurt. For
all patches in the set:

    Reviewed-by: Henrik Rydberg <rydberg@euromail.se>

Thanks Ping, thanks Chris.

Henrik
--
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
Dmitry Torokhov July 7, 2011, 5:19 a.m. UTC | #3
On Wed, Jul 06, 2011 at 07:52:09AM +0200, Henrik Rydberg wrote:
> On Tue, Jul 05, 2011 at 09:34:08PM -0500, Chris Bagwell wrote:
> > On Tue, Jul 5, 2011 at 6:26 PM, Ping Cheng <pinglinux@gmail.com> wrote:
> > > The old code may call input_sync without sending any other events.
> > > Although the sync event will be ignored in the userland, eliminating
> > > unnecessary kernel events is the right way to go.
> > 
> > Aligns the code block with previous case statement as well.
> > 
> > Reviewed-by: Chris Bagwell <chris@cnpbagwell.com>
> 
> The sync will not even reach userland, but the patch wont hurt. For
> all patches in the set:
> 
>     Reviewed-by: Henrik Rydberg <rydberg@euromail.se>
> 
> Thanks Ping, thanks Chris.
> 

Applied all 4, thanks everyone.
diff mbox

Patch

diff --git a/drivers/input/tablet/wacom_wac.c b/drivers/input/tablet/wacom_wac.c
index 19554a4..03ebcc8 100644
--- a/drivers/input/tablet/wacom_wac.c
+++ b/drivers/input/tablet/wacom_wac.c
@@ -300,8 +300,8 @@  static int wacom_graphire_irq(struct wacom_wac *wacom)
 				wacom->id[1] = 0;
 			input_report_abs(input, ABS_MISC, wacom->id[1]);
 			input_event(input, EV_MSC, MSC_SERIAL, 0xf0);
+			retval = 1;
 		}
-		retval = 1;
 		break;
 	}
 exit: