Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 260787
b: refs/heads/master
c: e449edb
h: refs/heads/master
i:
  260785: 72e6d99
  260783: dd0cda3
v: v3
  • Loading branch information
Axel Lin authored and Dmitry Torokhov committed Jul 19, 2011
1 parent 7aaa346 commit ba43ee8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 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: dc3e8247eb90655c0ff01ce03bdf3aa5868f1cde
refs/heads/master: e449edbb91decd0260105fadd4f5fcc3ce170e01
15 changes: 5 additions & 10 deletions trunk/drivers/input/touchscreen/intel-mid-touch.c
Original file line number Diff line number Diff line change
Expand Up @@ -448,15 +448,11 @@ static int __devinit mrstouch_read_pmic_id(uint *vendor, uint *rev)
*/
static int __devinit mrstouch_chan_parse(struct mrstouch_dev *tsdev)
{
int err, i, found;
int found = 0;
int err, i;
u8 r8;

found = -1;

for (i = 0; i < MRSTOUCH_MAX_CHANNELS; i++) {
if (found >= 0)
break;

err = intel_scu_ipc_ioread8(PMICADDR0 + i, &r8);
if (err)
return err;
Expand All @@ -466,16 +462,15 @@ static int __devinit mrstouch_chan_parse(struct mrstouch_dev *tsdev)
break;
}
}
if (found < 0)
return 0;

if (tsdev->vendor == PMIC_VENDOR_FS) {
if (found && found > (MRSTOUCH_MAX_CHANNELS - 18))
if (found > MRSTOUCH_MAX_CHANNELS - 18)
return -ENOSPC;
} else {
if (found && found > (MRSTOUCH_MAX_CHANNELS - 4))
if (found > MRSTOUCH_MAX_CHANNELS - 4)
return -ENOSPC;
}

return found;
}

Expand Down

0 comments on commit ba43ee8

Please sign in to comment.