@@ -611,9 +611,7 @@ static int hgpk_reset_device(struct psmouse *psmouse, bool recalibrate)
/* send the recalibrate request */
if (ps2_command(ps2dev, NULL, 0xf5) ||
- ps2_command(ps2dev, NULL, 0xf5) ||
- ps2_command(ps2dev, NULL, 0xe6) ||
- ps2_command(ps2dev, NULL, 0xf5)) {
+ ps2_command(ps2dev, NULL, 0xe6)) {
return -1;
}
@@ -728,7 +726,6 @@ static int hgpk_toggle_powersave(struct psmouse *psmouse, int enable)
psmouse_dbg(psmouse, "Powering off touchpad.\n");
if (ps2_command(ps2dev, NULL, 0xec) ||
- ps2_command(ps2dev, NULL, 0xec) ||
ps2_command(ps2dev, NULL, 0xea)) {
return -1;
}
Remove the duplicated condition, and make code clear. Signed-off-by: Haowen Bai <baihaowen@meizu.com> --- drivers/input/mouse/hgpk.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)