Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 106910
b: refs/heads/master
c: 494f685
h: refs/heads/master
v: v3
  • Loading branch information
Harvey Harrison authored and Dmitry Torokhov committed Jul 23, 2008
1 parent 5db82e1 commit 2dec7f0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 53703659ab559a58a3058e69aeb59c06d4872358
refs/heads/master: 494f685775ee4c2f3db4081209f00ff0633243fc
6 changes: 2 additions & 4 deletions trunk/drivers/input/touchscreen/ads7846.c
Original file line number Diff line number Diff line change
Expand Up @@ -633,19 +633,17 @@ static void ads7846_rx_val(void *ads)
struct ads7846 *ts = ads;
struct spi_message *m;
struct spi_transfer *t;
u16 *rx_val;
int val;
int action;
int status;

m = &ts->msg[ts->msg_idx];
t = list_entry(m->transfers.prev, struct spi_transfer, transfer_list);
rx_val = t->rx_buf;

/* adjust: on-wire is a must-ignore bit, a BE12 value, then padding;
* built from two 8 bit values written msb-first.
*/
val = be16_to_cpu(*rx_val) >> 3;
val = be16_to_cpup((__be16 *)t->rx_buf) >> 3;

action = ts->filter(ts->filter_data, ts->msg_idx, &val);
switch (action) {
Expand All @@ -659,7 +657,7 @@ static void ads7846_rx_val(void *ads)
m = ts->last_msg;
break;
case ADS7846_FILTER_OK:
*rx_val = val;
*(u16 *)t->rx_buf = val;
ts->tc.ignore = 0;
m = &ts->msg[++ts->msg_idx];
break;
Expand Down

0 comments on commit 2dec7f0

Please sign in to comment.