diff options
author | Paul Fox <pgf@laptop.org> | 2012-02-24 00:51:37 -0800 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2012-02-24 00:55:33 -0800 |
commit | c35c0e7d425c11f629d9d037df6c37a7ffebcd96 (patch) | |
tree | 7f9c328b6677062e6f273a1bfd43c4031844af28 /drivers/input/mouse/sentelic.c | |
parent | bd26f3d6fbb84f101f3e78f0591415d1c407976a (diff) |
Input: psmouse - use psmouse_[de]activate() from sentelic and hgpk drivers
Make use of psmouse_activate() and psmouse_deactivate() from psmouse-base.c
Signed-off-by: Andres Salomon <dilinger@queued.net>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input/mouse/sentelic.c')
-rw-r--r-- | drivers/input/mouse/sentelic.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/input/mouse/sentelic.c b/drivers/input/mouse/sentelic.c index 5babc47b39aa..bab2d19e17f7 100644 --- a/drivers/input/mouse/sentelic.c +++ b/drivers/input/mouse/sentelic.c @@ -90,8 +90,7 @@ static int fsp_reg_read(struct psmouse *psmouse, int reg_addr, int *reg_val) * to do that for writes because sysfs set helper does this for * us. */ - ps2_command(ps2dev, NULL, PSMOUSE_CMD_DISABLE); - psmouse_set_state(psmouse, PSMOUSE_CMD_MODE); + psmouse_deactivate(psmouse); ps2_begin_command(ps2dev); @@ -128,8 +127,7 @@ static int fsp_reg_read(struct psmouse *psmouse, int reg_addr, int *reg_val) out: ps2_end_command(ps2dev); - ps2_command(ps2dev, NULL, PSMOUSE_CMD_ENABLE); - psmouse_set_state(psmouse, PSMOUSE_ACTIVATED); + psmouse_activate(psmouse); dev_dbg(&ps2dev->serio->dev, "READ REG: 0x%02x is 0x%02x (rc = %d)\n", reg_addr, *reg_val, rc); return rc; @@ -213,8 +211,7 @@ static int fsp_page_reg_read(struct psmouse *psmouse, int *reg_val) unsigned char param[3]; int rc = -1; - ps2_command(ps2dev, NULL, PSMOUSE_CMD_DISABLE); - psmouse_set_state(psmouse, PSMOUSE_CMD_MODE); + psmouse_deactivate(psmouse); ps2_begin_command(ps2dev); @@ -239,8 +236,7 @@ static int fsp_page_reg_read(struct psmouse *psmouse, int *reg_val) out: ps2_end_command(ps2dev); - ps2_command(ps2dev, NULL, PSMOUSE_CMD_ENABLE); - psmouse_set_state(psmouse, PSMOUSE_ACTIVATED); + psmouse_activate(psmouse); dev_dbg(&ps2dev->serio->dev, "READ PAGE REG: 0x%02x (rc = %d)\n", *reg_val, rc); return rc; |