Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input

Pull input fixes from Dmitry Torokhov:
"Just two small fixups to ads7846 touchscreen controller driver and
Cypress touchpad driver"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
Input: cyapa - fix the copy paste error on electrodes_rx value
Input: ads7846 - correct the value got from SPI

Changed files
+9 -9
drivers
input
mouse
touchscreen
+3 -7
drivers/input/mouse/cyapa_gen6.c
··· 241 241 memcpy(&cyapa->product_id[13], &resp_data[62], 2); 242 242 cyapa->product_id[15] = '\0'; 243 243 244 + /* Get the number of Rx electrodes. */ 244 245 rotat_align = resp_data[68]; 245 - if (rotat_align) { 246 - cyapa->electrodes_rx = cyapa->electrodes_y; 247 - cyapa->electrodes_rx = cyapa->electrodes_y; 248 - } else { 249 - cyapa->electrodes_rx = cyapa->electrodes_x; 250 - cyapa->electrodes_rx = cyapa->electrodes_y; 251 - } 246 + cyapa->electrodes_rx = 247 + rotat_align ? cyapa->electrodes_y : cyapa->electrodes_x; 252 248 cyapa->aligned_electrodes_rx = (cyapa->electrodes_rx + 3) & ~3u; 253 249 254 250 if (!cyapa->electrodes_x || !cyapa->electrodes_y ||
+6 -2
drivers/input/touchscreen/ads7846.c
··· 668 668 669 669 static int ads7846_get_value(struct ads7846 *ts, struct spi_message *m) 670 670 { 671 + int value; 671 672 struct spi_transfer *t = 672 673 list_entry(m->transfers.prev, struct spi_transfer, transfer_list); 673 674 674 675 if (ts->model == 7845) { 675 - return be16_to_cpup((__be16 *)&(((char*)t->rx_buf)[1])) >> 3; 676 + value = be16_to_cpup((__be16 *)&(((char *)t->rx_buf)[1])); 676 677 } else { 677 678 /* 678 679 * adjust: on-wire is a must-ignore bit, a BE12 value, then 679 680 * padding; built from two 8 bit values written msb-first. 680 681 */ 681 - return be16_to_cpup((__be16 *)t->rx_buf) >> 3; 682 + value = be16_to_cpup((__be16 *)t->rx_buf); 682 683 } 684 + 685 + /* enforce ADC output is 12 bits width */ 686 + return (value >> 3) & 0xfff; 683 687 } 684 688 685 689 static void ads7846_update_value(struct spi_message *m, int val)