Skip to content

Commit

Permalink
Input: penmount - simplify unregister procedure
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dmitry Torokhov committed Sep 21, 2011
1 parent 98b013e commit c3a01ba
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/input/touchscreen/penmount.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

/*
Expand Down

0 comments on commit c3a01ba

Please sign in to comment.