Skip to content

Commit

Permalink
Input: cyapa - fix the copy paste error on electrodes_rx value
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dudley Du authored and Dmitry Torokhov committed Oct 14, 2015
1 parent 879f2fe commit a487c03
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions drivers/input/mouse/cyapa_gen6.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 ||
Expand Down

0 comments on commit a487c03

Please sign in to comment.