Commit c3a01ba9 authored by Dmitry Torokhov's avatar Dmitry Torokhov

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: default avatarJohn Sung <penmount.touch@gmail.com>
Signed-off-by: default avatarDmitry Torokhov <dtor@mail.ru>
parent 98b013eb
......@@ -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);
}
/*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment