Input: psmouse - cleanup Focaltech code
Subsystems (2)
PATCH 1/1 Input: psmouse - cleanup Focaltech code
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
--- drivers/input/mouse/focaltech.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/input/mouse/focaltech.c +3 -3
@@ -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,
Signature · 1 line
2.7.4
The changes look good to me. However, what wording do other drivers use? I've seen "TouchPad" with a capital P before. If this patch breaks scripts searching for that string anyways, that's an opportunity to unify the capitalization there. It probably doesn't matter, though... I don't see a problem with this patch.
I can't test it because I no longer have the hardware.
Am 08.10.2016 um 12:38 schrieb Dmitry Tunin:
Quoted 34 lines
psmouse->name"Focaltech Touchpad" is an overkill. In xinput it is too long as "FocaltechPS/2 Focaltech Focaltech Touchpad"In
focaltech_report_state()pointer topsmouse->devis already stored as *devSigned-off-by Dmitry Tunin <[email protected]>--- drivers/input/mouse/focaltech.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)drivers/input/mouse/focaltech.c +3
-3@@ -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,
Other drivers, like Synaptics use the same as I suggested. They even shorten in psmouse-base.c psmouse_protocol.name to SynPS/2. You used FocaltechPS/2. I think it is OK.
I do not think it is a big problem of changing the naming. It happens a lot.
I still have the hardware and I am still thankful to you that you wrote that driver.
Now I am trying to write my own for a new i2c touchpad that is used in new Asus laptops ;-)
2016-10-17 20:27 GMT+03:00 Mathias Gottschlag <[email protected]>:
Quoted 45 lines
The changes look good to me. However, what wording do other drivers use? I've seen "TouchPad" with a capital P before. If this patch breaks scripts searching for that string anyways, that's an opportunity to unify the capitalization there. It probably doesn't matter, though... I don't see a problem with this patch.
I can't test it because I no longer have the hardware.
Am 08.10.2016 um 12:38 schrieb Dmitry Tunin:
Quoted 34 lines
psmouse->name"Focaltech Touchpad" is an overkill. In xinput it is too long as "FocaltechPS/2 Focaltech Focaltech Touchpad"In
focaltech_report_state()pointer topsmouse->devis already stored as *devSigned-off-by Dmitry Tunin <[email protected]>--- drivers/input/mouse/focaltech.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)drivers/input/mouse/focaltech.c +3
-3@@ -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,
Quoted 6 lines · Dmitry Tunin
psmouse->name"Focaltech Touchpad" is an overkill. In xinput it is too long as "FocaltechPS/2 Focaltech Focaltech Touchpad"In
focaltech_report_state()pointer topsmouse->devis already stored as *devSigned-off-by Dmitry Tunin <[email protected]>
Applied, thank you.
Quoted 31 lines
--- drivers/input/mouse/focaltech.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)drivers/input/mouse/focaltech.c +3
-3@@ -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,Signature · 1 line
2.7.4
Signature · 1 line
Dmitry