summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDudley Du <dudl@cypress.com>2015-10-12 10:16:16 -0700
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2015-10-13 23:29:52 -0700
commita487c03fa28286d0de42558da1aa57d82d54fc4d (patch)
tree89ae8fc759e10fb9b774e5eef8258503c99bb349 /drivers
parent879f2fea8a5a748bcbf98d2cdce9139c045505d3 (diff)
downloadlinux-a487c03fa28286d0de42558da1aa57d82d54fc4d.tar.bz2
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. Reported-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com> Signed-off-by: Dudley Du <dudl@cypress.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/input/mouse/cyapa_gen6.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/input/mouse/cyapa_gen6.c b/drivers/input/mouse/cyapa_gen6.c
index 5f191071d44a..e4eb048d1bf6 100644
--- a/drivers/input/mouse/cyapa_gen6.c
+++ b/drivers/input/mouse/cyapa_gen6.c
@@ -241,14 +241,10 @@ 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) {
- cyapa->electrodes_rx = cyapa->electrodes_y;
- cyapa->electrodes_rx = cyapa->electrodes_y;
- } else {
- cyapa->electrodes_rx = cyapa->electrodes_x;
- cyapa->electrodes_rx = cyapa->electrodes_y;
- }
+ cyapa->electrodes_rx =
+ rotat_align ? cyapa->electrodes_y : cyapa->electrodes_x;
cyapa->aligned_electrodes_rx = (cyapa->electrodes_rx + 3) & ~3u;
if (!cyapa->electrodes_x || !cyapa->electrodes_y ||