Input: ads7846 - fix sparse endian warnings

Also remove the temporary pointer and use ->rx_buf directly.

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>

authored by Harvey Harrison and committed by Dmitry Torokhov 494f6857 53703659

+2 -4
+2 -4
drivers/input/touchscreen/ads7846.c
··· 633 633 struct ads7846 *ts = ads; 634 634 struct spi_message *m; 635 635 struct spi_transfer *t; 636 - u16 *rx_val; 637 636 int val; 638 637 int action; 639 638 int status; 640 639 641 640 m = &ts->msg[ts->msg_idx]; 642 641 t = list_entry(m->transfers.prev, struct spi_transfer, transfer_list); 643 - rx_val = t->rx_buf; 644 642 645 643 /* adjust: on-wire is a must-ignore bit, a BE12 value, then padding; 646 644 * built from two 8 bit values written msb-first. 647 645 */ 648 - val = be16_to_cpu(*rx_val) >> 3; 646 + val = be16_to_cpup((__be16 *)t->rx_buf) >> 3; 649 647 650 648 action = ts->filter(ts->filter_data, ts->msg_idx, &val); 651 649 switch (action) { ··· 657 659 m = ts->last_msg; 658 660 break; 659 661 case ADS7846_FILTER_OK: 660 - *rx_val = val; 662 + *(u16 *)t->rx_buf = val; 661 663 ts->tc.ignore = 0; 662 664 m = &ts->msg[++ts->msg_idx]; 663 665 break;