Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 269509
b: refs/heads/master
c: 341deef
h: refs/heads/master
i:
  269507: 13da601
v: v3
  • Loading branch information
Philip Rakity authored and Dmitry Torokhov committed Oct 12, 2011
1 parent 7668263 commit 1ad2e68
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 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: 550eca7cafa1c6e2c077afb2211a364a982d8645
refs/heads/master: 341deefe8f4584b09564193cb46d8cf386f491a5
6 changes: 6 additions & 0 deletions trunk/drivers/input/touchscreen/tsc2007.c
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,12 @@ static int __devinit tsc2007_probe(struct i2c_client *client,
ts->get_pendown_state = pdata->get_pendown_state;
ts->clear_penirq = pdata->clear_penirq;

if (pdata->x_plate_ohms == 0) {
dev_err(&client->dev, "x_plate_ohms is not set up in platform data");
err = -EINVAL;
goto err_free_mem;
}

snprintf(ts->phys, sizeof(ts->phys),
"%s/input0", dev_name(&client->dev));

Expand Down
2 changes: 1 addition & 1 deletion trunk/include/linux/i2c/tsc2007.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

struct tsc2007_platform_data {
u16 model; /* 2007. */
u16 x_plate_ohms;
u16 x_plate_ohms; /* must be non-zero value */
u16 max_rt; /* max. resistance above which samples are ignored */
unsigned long poll_delay; /* delay (in ms) after pen-down event
before polling starts */
Expand Down

0 comments on commit 1ad2e68

Please sign in to comment.