linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2/3] TSC-40: fix checkstyle issues
@ 2011-09-13  8:18 Christian Gmeiner
  2011-09-13  8:47 ` Sebastian Andrzej Siewior
  0 siblings, 1 reply; 4+ messages in thread
From: Christian Gmeiner @ 2011-09-13  8:18 UTC (permalink / raw)
  To: linux-input; +Cc: bigeasy

>From 3e46bad59a19787a23efb4972117243701d973bd Mon Sep 17 00:00:00 2001
From: Christian Gmeiner <christian.gmeiner@gmail.com>
Date: Wed, 7 Sep 2011 14:13:29 +0200
Subject: [PATCH 2/3] TSC40: fix checkstyle issues

This patch fixes all found problems.

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
---
drivers/input/touchscreen/tsc40.c |   63 +++++++++++++++++++------------------
1 files changed, 32 insertions(+), 31 deletions(-)

diff --git a/drivers/input/touchscreen/tsc40.c
b/drivers/input/touchscreen/tsc40.c
index c9a86cd..b73ef2f 100644
--- a/drivers/input/touchscreen/tsc40.c
+++ b/drivers/input/touchscreen/tsc40.c
@@ -178,7 +178,7 @@ static irqreturn_t tsc_interrupt(struct serio *serio,
{
       struct tsc_ser *ptsc = serio_get_drvdata(serio);

-       switch(ptsc->state) {
+       switch (ptsc->state) {
       case STATE_GET_ID:
               handle_get_id(serio, data);
               break;
@@ -267,7 +267,7 @@ static int tsc_connect(struct serio *serio, struct
serio_driver *drv)
               if (ret)
                       goto fail3;

-               msleep(15);
+               msleep(20);
               ret = tsc_get_id(serio, STATE_GET_ID);
               if (ret)
                       goto fail3;
@@ -276,7 +276,7 @@ static int tsc_connect(struct serio *serio, struct
serio_driver *drv)
               if (ret)
                       goto fail3;

-               msleep(15);
+               msleep(20);

               ret = tsc_get_id(serio, STATE_RESET_GET_ID);
               if (ret)
@@ -285,34 +285,35 @@ static int tsc_connect(struct serio *serio,
struct serio_driver *drv)

       mode = ptsc->data[0];
       switch (mode) {
-               case 0x00:
-                       ptsc->state = STATE_INIT_MODE;
-                       break;
+       case 0x00:
+               ptsc->state = STATE_INIT_MODE;
+               break;

-               case 0x05:
-               case 0x01:
-               case 0x21:
-               case 0x31:
-               case 0x02:
-               case 0x0a:
-               case 0x2a:
-               case 0x3a:
-                       ret = serio_write(serio, TSC10_CMD_RESET);
-                       if (ret)
-                               goto fail3;
-                       msleep(16);
-                       ret = tsc_get_id(serio, STATE_GET_ID);
-                       if (ret)
-                               goto fail3;
-                       if (ptsc->data[0] == 0) {
-                               ptsc->state = STATE_INIT_MODE;
-                               break;
-                       }
-                       dev_err(&serio->dev, "Can't get into init mode
in %x\n", ptsc->data[0]);
+       case 0x05:
+       case 0x01:
+       case 0x21:
+       case 0x31:
+       case 0x02:
+       case 0x0a:
+       case 0x2a:
+       case 0x3a:
+               ret = serio_write(serio, TSC10_CMD_RESET);
+               if (ret)
                       goto fail3;
-               default:
-                       dev_err(&serio->dev, "Unexpected mode: %02x\n", mode);
+               msleep(20);
+               ret = tsc_get_id(serio, STATE_GET_ID);
+               if (ret)
                       goto fail3;
+               if (ptsc->data[0] == 0) {
+                       ptsc->state = STATE_INIT_MODE;
+                       break;
+               }
+               dev_err(&serio->dev, "Can't get into init mode in %x\n",
+                       ptsc->data[0]);
+               goto fail3;
+       default:
+               dev_err(&serio->dev, "Unexpected mode: %02x\n", mode);
+               goto fail3;
       }

       ptsc->idx = 0;
@@ -344,11 +345,11 @@ static int tsc_connect(struct serio *serio,
struct serio_driver *drv)
               goto fail3;

       return 0;
- fail3:
+fail3:
       serio_close(serio);
- fail2:
+fail2:
       serio_set_drvdata(serio, NULL);
- fail1:
+fail1:
       input_free_device(input_dev);
       kfree(ptsc);
       return ret;
--
1.7.4.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 2/3] TSC-40: fix checkstyle issues
  2011-09-13  8:18 [PATCH 2/3] TSC-40: fix checkstyle issues Christian Gmeiner
@ 2011-09-13  8:47 ` Sebastian Andrzej Siewior
  2011-09-13 16:37   ` Dmitry Torokhov
  0 siblings, 1 reply; 4+ messages in thread
From: Sebastian Andrzej Siewior @ 2011-09-13  8:47 UTC (permalink / raw)
  To: Christian Gmeiner; +Cc: linux-input

* Christian Gmeiner | 2011-09-13 10:18:35 [+0200]:

>Subject: [PATCH 2/3] TSC40: fix checkstyle issues
>
>This patch fixes all found problems.

Besides the checkpatch fixes you also increased the msleep delay. For
the checkpatch part it is probably better in include it in the previous
patch unless Dmitry prefers something different. The same goes probably
for the msleep part but pleae denote why this was required.

Sebastian

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 2/3] TSC-40: fix checkstyle issues
  2011-09-13  8:47 ` Sebastian Andrzej Siewior
@ 2011-09-13 16:37   ` Dmitry Torokhov
  2011-09-14 12:04     ` Christian Gmeiner
  0 siblings, 1 reply; 4+ messages in thread
From: Dmitry Torokhov @ 2011-09-13 16:37 UTC (permalink / raw)
  To: Sebastian Andrzej Siewior; +Cc: Christian Gmeiner, linux-input

On Tue, Sep 13, 2011 at 10:47:20AM +0200, Sebastian Andrzej Siewior wrote:
> * Christian Gmeiner | 2011-09-13 10:18:35 [+0200]:
> 
> >Subject: [PATCH 2/3] TSC40: fix checkstyle issues
> >
> >This patch fixes all found problems.
> 
> Besides the checkpatch fixes you also increased the msleep delay. For
> the checkpatch part it is probably better in include it in the previous
> patch unless Dmitry prefers something different. The same goes probably
> for the msleep part but pleae denote why this was required.

Yes, please fold the cleanup patches into the original patch.

Thanks.

-- 
Dmitry

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 2/3] TSC-40: fix checkstyle issues
  2011-09-13 16:37   ` Dmitry Torokhov
@ 2011-09-14 12:04     ` Christian Gmeiner
  0 siblings, 0 replies; 4+ messages in thread
From: Christian Gmeiner @ 2011-09-14 12:04 UTC (permalink / raw)
  To: Dmitry Torokhov; +Cc: Sebastian Andrzej Siewior, linux-input

2011/9/13 Dmitry Torokhov <dmitry.torokhov@gmail.com>:
> On Tue, Sep 13, 2011 at 10:47:20AM +0200, Sebastian Andrzej Siewior wrote:
>> * Christian Gmeiner | 2011-09-13 10:18:35 [+0200]:
>>
>> >Subject: [PATCH 2/3] TSC40: fix checkstyle issues
>> >
>> >This patch fixes all found problems.
>>
>> Besides the checkpatch fixes you also increased the msleep delay. For
>> the checkpatch part it is probably better in include it in the previous
>> patch unless Dmitry prefers something different. The same goes probably
>> for the msleep part but pleae denote why this was required.
>
> Yes, please fold the cleanup patches into the original patch.
>

Okay - will send a v2 in a few days

--
Christian Gmeiner, MSc

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-09-14 12:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-13  8:18 [PATCH 2/3] TSC-40: fix checkstyle issues Christian Gmeiner
2011-09-13  8:47 ` Sebastian Andrzej Siewior
2011-09-13 16:37   ` Dmitry Torokhov
2011-09-14 12:04     ` Christian Gmeiner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).