From: Dmitry Torokhov Date: Tue, 13 Sep 2011 05:13:00 +0000 (-0700) Subject: Input: penmount - simplify unregister procedure X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c3a01ba9e45f01c6505a41efb33c420a0c959eb3;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Dmitry Torokhov --- 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) { struct pm *pm = serio_get_drvdata(serio); - input_get_device(pm->dev); - input_unregister_device(pm->dev); serio_close(serio); - serio_set_drvdata(serio, NULL); - input_put_device(pm->dev); + + input_unregister_device(pm->dev); kfree(pm); + + serio_set_drvdata(serio, NULL); } /*