input: cyapa: fix the copy paste error on electrodes_rx value
Subsystems (2)
PATCH 1/1 input: cyapa: fix the copy paste error on electrodes_rx value
Fix the copy paste error on the electrodes_rx value set code which will cause the electrodes_rx value be always set to the value of electrodes_y.
Reviewed-by Dmitry Torokhov <[email protected]>
Reviewed-by Sudip Mukherjee <[email protected]>
Signed-off-by Dudley Du <[email protected]>
--- drivers/input/mouse/cyapa_gen6.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)
drivers/input/mouse/cyapa_gen6.c +3 -5
@@ -241,14 +241,12 @@ static int cyapa_gen6_read_sys_info(struct cyapa *cyapa)memcpy (&cyapa->product_id[13 ], &resp_data[62 ],2 ); cyapa->product_id[15 ] ='\0' ; +/* Get the number of Rx electrodes. */ rotat_align = resp_data[68 ]; -if (rotat_align) { +if (rotat_align) cyapa->electrodes_rx = cyapa->electrodes_y; - cyapa->electrodes_rx = cyapa->electrodes_y; - }else { +else cyapa->electrodes_rx = cyapa->electrodes_x; - cyapa->electrodes_rx = cyapa->electrodes_y; - } cyapa->aligned_electrodes_rx = (cyapa->electrodes_rx +3 ) & ~3u ; if (!cyapa->electrodes_x || !cyapa->electrodes_y ||
Signature · 9 lines
1.9.1 --------------------------------------------------------------- This message and any attachments may contain Cypress (or its subsidiaries) confidential information. If it has been received in error, please advise the sender and immediately delete this message. ---------------------------------------------------------------
Quoted 7 lines · Dudley Du
Fix the copy paste error on the
electrodes_rxvalue set code which will cause theelectrodes_rxvalue be always set to the value ofelectrodes_y.Reviewed-by Dmitry Torokhov <[email protected]>Reviewed-by Sudip Mukherjee <[email protected]>Signed-off-by Dudley Du <[email protected]>
Reviewed-by Benson Leung <[email protected]>
Thanks!
Signature · 4 lines
Benson Leung Senior Software Engineer, Chrome OS Google Inc. [email protected]
Dmitry Torokhov
maintainerQuoted 6 lines · Dudley Du
Fix the copy paste error on the
electrodes_rxvalue set code which will cause theelectrodes_rxvalue be always set to the value ofelectrodes_y.Reviewed-by Dmitry Torokhov <[email protected]>Reviewed-by Sudip Mukherjee <[email protected]>Signed-off-by Dudley Du <[email protected]>
Applied (with change to ternary ?: ), thank you.
Quoted 37 lines
--- drivers/input/mouse/cyapa_gen6.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)drivers/input/mouse/cyapa_gen6.c +3
-5@@ -241,14 +241,12 @@ static int cyapa_gen6_read_sys_info(struct cyapa *cyapa)memcpy (&cyapa->product_id[13 ], &resp_data[62 ],2 ); cyapa->product_id[15 ] ='\0' ; +/* Get the number of Rx electrodes. */ rotat_align = resp_data[68 ]; -if (rotat_align) { +if (rotat_align) cyapa->electrodes_rx = cyapa->electrodes_y; - cyapa->electrodes_rx = cyapa->electrodes_y; - }else { +else cyapa->electrodes_rx = cyapa->electrodes_x; - cyapa->electrodes_rx = cyapa->electrodes_y; - } cyapa->aligned_electrodes_rx = (cyapa->electrodes_rx +3 ) & ~3u ; if (!cyapa->electrodes_x || !cyapa->electrodes_y ||Signature · 9 lines
1.9.1 --------------------------------------------------------------- This message and any attachments may contain Cypress (or its subsidiaries) confidential information. If it has been received in error, please advise the sender and immediately delete this message. ---------------------------------------------------------------
Signature · 1 line
Dmitry