linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Input: Remove duplicated condition
@ 2022-04-22  9:25 Haowen Bai
  0 siblings, 0 replies; only message in thread
From: Haowen Bai @ 2022-04-22  9:25 UTC (permalink / raw)
  To: Dmitry Torokhov; +Cc: Haowen Bai, linux-input, linux-kernel

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(-)

diff --git a/drivers/input/mouse/hgpk.c b/drivers/input/mouse/hgpk.c
index 4dc441309aac..7c6b669b687f 100644
--- a/drivers/input/mouse/hgpk.c
+++ b/drivers/input/mouse/hgpk.c
@@ -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;
 		}
-- 
2.7.4


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2022-04-22  9:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-22  9:25 [PATCH] Input: Remove duplicated condition Haowen Bai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).