[PATCH 2/2] Input: wacom_w8001 - simplify w8001_remove

From
Dmitry Torokhov <dmitry.torokhov@gmail.com>
Date
2011-08-21 20:15:51
Reply to
Dmitry Torokhov, 2011-08-21
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.

Signed-off-by: Dmitry Torokhov <redacted>
---
 drivers/input/touchscreen/wacom_w8001.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/input/touchscreen/wacom_w8001.c b/drivers/input/touchscreen/wacom_w8001.c
index 5ece6c1..1f42d91 100644
--- a/drivers/input/touchscreen/wacom_w8001.c
+++ b/drivers/input/touchscreen/wacom_w8001.c
@@ -499,12 +499,12 @@ static void w8001_disconnect(struct serio *serio)
 {
 	struct w8001 *w8001 = serio_get_drvdata(serio);
 
-	input_get_device(w8001->dev);
-	input_unregister_device(w8001->dev);
 	serio_close(serio);
-	serio_set_drvdata(serio, NULL);
-	input_put_device(w8001->dev);
+
+	input_unregister_device(w8001->dev);
 	kfree(w8001);
+
+	serio_set_drvdata(serio, NULL);
 }
 
 /*
-- 
1.7.6
Thread (4 messages) 4 messages, 2 authors, last reply 2011-08-23
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help