From: Dmitry Torokhov Date: Wed, 24 Aug 2011 05:57:00 +0000 (-0700) Subject: Input: wacom_w8001 - simplify w8001_remove X-Git-Tag: next-20110825~45^2~10 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=66fd9385ee9c582ee88031ba5028748cb38c986d;p=karo-tx-linux.git Input: wacom_w8001 - simplify w8001_remove 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: Ping Cheng Signed-off-by: Dmitry Torokhov --- diff --git a/drivers/input/touchscreen/wacom_w8001.c b/drivers/input/touchscreen/wacom_w8001.c index 5ece6c1f3296..1f42d91f755b 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); } /*