diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2011-09-13 01:13:00 -0400 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2011-09-21 01:46:31 -0400 |
commit | c3a01ba9e45f01c6505a41efb33c420a0c959eb3 (patch) | |
tree | 24e2e17f328b0be9afb799d26328792b38ba3208 | |
parent | 98b013eb7a94cfd29fcc782f3b7d9f9fe06ac50d (diff) |
Input: penmount - simplify unregister procedure
Since touchscreen driver does not handle any events to be sent to the
device we can close serio port first and then unregister the input device.
Tested-by: John Sung <penmount.touch@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
-rw-r--r-- | drivers/input/touchscreen/penmount.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/input/touchscreen/penmount.c b/drivers/input/touchscreen/penmount.c index 7fc556295c0e..4c012fb2b01e 100644 --- a/drivers/input/touchscreen/penmount.c +++ b/drivers/input/touchscreen/penmount.c | |||
@@ -183,12 +183,12 @@ static void pm_disconnect(struct serio *serio) | |||
183 | { | 183 | { |
184 | struct pm *pm = serio_get_drvdata(serio); | 184 | struct pm *pm = serio_get_drvdata(serio); |
185 | 185 | ||
186 | input_get_device(pm->dev); | ||
187 | input_unregister_device(pm->dev); | ||
188 | serio_close(serio); | 186 | serio_close(serio); |
189 | serio_set_drvdata(serio, NULL); | 187 | |
190 | input_put_device(pm->dev); | 188 | input_unregister_device(pm->dev); |
191 | kfree(pm); | 189 | kfree(pm); |
190 | |||
191 | serio_set_drvdata(serio, NULL); | ||
192 | } | 192 | } |
193 | 193 | ||
194 | /* | 194 | /* |