Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 15040
b: refs/heads/master
c: 1393c3e
h: refs/heads/master
v: v3
  • Loading branch information
Nicolas Pitre authored and Linus Torvalds committed Dec 12, 2005
1 parent 42303fc commit d7f58da
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 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: 68799398cea44b81d1e919f842d8d84d471053d5
refs/heads/master: 1393c3edc307e0a2ec4274f67e342907ffd7deb5
19 changes: 11 additions & 8 deletions trunk/drivers/mfd/ucb1x00-ts.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,16 +59,18 @@ static int adcsync;

static inline void ucb1x00_ts_evt_add(struct ucb1x00_ts *ts, u16 pressure, u16 x, u16 y)
{
input_report_abs(ts->idev, ABS_X, x);
input_report_abs(ts->idev, ABS_Y, y);
input_report_abs(ts->idev, ABS_PRESSURE, pressure);
input_sync(ts->idev);
struct input_dev *idev = ts->idev;
input_report_abs(idev, ABS_X, x);
input_report_abs(idev, ABS_Y, y);
input_report_abs(idev, ABS_PRESSURE, pressure);
input_sync(idev);
}

static inline void ucb1x00_ts_event_release(struct ucb1x00_ts *ts)
{
input_report_abs(ts->idev, ABS_PRESSURE, 0);
input_sync(ts->idev);
struct input_dev *idev = ts->idev;
input_report_abs(idev, ABS_PRESSURE, 0);
input_sync(idev);
}

/*
Expand Down Expand Up @@ -297,7 +299,7 @@ static void ucb1x00_ts_irq(int idx, void *id)

static int ucb1x00_ts_open(struct input_dev *idev)
{
struct ucb1x00_ts *ts = (struct ucb1x00_ts *)idev;
struct ucb1x00_ts *ts = idev->private;
int ret = 0;

BUG_ON(ts->rtask);
Expand Down Expand Up @@ -334,7 +336,7 @@ static int ucb1x00_ts_open(struct input_dev *idev)
*/
static void ucb1x00_ts_close(struct input_dev *idev)
{
struct ucb1x00_ts *ts = (struct ucb1x00_ts *)idev;
struct ucb1x00_ts *ts = idev->private;

if (ts->rtask)
kthread_stop(ts->rtask);
Expand Down Expand Up @@ -386,6 +388,7 @@ static int ucb1x00_ts_add(struct ucb1x00_dev *dev)
ts->ucb = dev->ucb;
ts->adcsync = adcsync ? UCB_SYNC : UCB_NOSYNC;

ts->idev->private = ts;
ts->idev->name = "Touchscreen panel";
ts->idev->id.product = ts->ucb->id;
ts->idev->open = ucb1x00_ts_open;
Expand Down

0 comments on commit d7f58da

Please sign in to comment.