Input: psmouse - cleanup Focaltech code
authorDmitry Tunin <hanipouspilot@gmail.com>
Mon, 24 Oct 2016 23:35:09 +0000 (16:35 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Tue, 25 Oct 2016 00:19:25 +0000 (17:19 -0700)
psmouse->name "Focaltech Touchpad" is an overkill. In xinput it is too long
as "FocaltechPS/2 Focaltech Focaltech Touchpad"

In focaltech_report_state() pointer to psmouse->dev is already stored as
*dev

Signed-off-by: Dmitry Tunin <hanipouspilot@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/mouse/focaltech.c

index 54eceb30ede5090e67415a7e70ae5f43d7dd9b3f..a7d39689bbfb6fc7df84f6a01a8b78bdc0cc6a99 100644 (file)
@@ -43,7 +43,7 @@ int focaltech_detect(struct psmouse *psmouse, bool set_properties)
 
        if (set_properties) {
                psmouse->vendor = "FocalTech";
-               psmouse->name = "FocalTech Touchpad";
+               psmouse->name = "Touchpad";
        }
 
        return 0;
@@ -146,8 +146,8 @@ static void focaltech_report_state(struct psmouse *psmouse)
        }
        input_mt_report_pointer_emulation(dev, true);
 
-       input_report_key(psmouse->dev, BTN_LEFT, state->pressed);
-       input_sync(psmouse->dev);
+       input_report_key(dev, BTN_LEFT, state->pressed);
+       input_sync(dev);
 }
 
 static void focaltech_process_touch_packet(struct psmouse *psmouse,