diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-12-03 16:13:40 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-12-03 16:13:40 +0000 |
commit | fb93c6697042ab2a4f0244e4b2808325a7dfb992 (patch) | |
tree | e07be7fd05ba272e5cedac20cdf78a9e61afc44f /nuttx/drivers/input | |
parent | c7049214583fe91d4cf3b72c7d3f2667a08dbc8e (diff) | |
download | px4-nuttx-fb93c6697042ab2a4f0244e4b2808325a7dfb992.tar.gz px4-nuttx-fb93c6697042ab2a4f0244e4b2808325a7dfb992.tar.bz2 px4-nuttx-fb93c6697042ab2a4f0244e4b2808325a7dfb992.zip |
Fix a cloned error in driver poll setup
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4132 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/drivers/input')
-rw-r--r-- | nuttx/drivers/input/ads7843e.c | 2 | ||||
-rw-r--r-- | nuttx/drivers/input/tsc2007.c | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/nuttx/drivers/input/ads7843e.c b/nuttx/drivers/input/ads7843e.c index 1e04de37c..d4b83703c 100644 --- a/nuttx/drivers/input/ads7843e.c +++ b/nuttx/drivers/input/ads7843e.c @@ -980,7 +980,7 @@ static int ads7843e_poll(FAR struct file *filep, FAR struct pollfd *fds, { /* Ignore waits that do not include POLLIN */ - if ((fds->revents & POLLIN) == 0) + if ((fds->events & POLLIN) == 0) { ret = -EDEADLK; goto errout; diff --git a/nuttx/drivers/input/tsc2007.c b/nuttx/drivers/input/tsc2007.c index 544cb1c79..3afe926fe 100644 --- a/nuttx/drivers/input/tsc2007.c +++ b/nuttx/drivers/input/tsc2007.c @@ -1073,7 +1073,7 @@ static int tsc2007_poll(FAR struct file *filep, FAR struct pollfd *fds, { FAR struct inode *inode; FAR struct tsc2007_dev_s *priv; - int ret = OK; + int ret; int i; ivdbg("setup: %d\n", (int)setup); @@ -1098,8 +1098,9 @@ static int tsc2007_poll(FAR struct file *filep, FAR struct pollfd *fds, { /* Ignore waits that do not include POLLIN */ - if ((fds->revents & POLLIN) == 0) + if ((fds->events & POLLIN) == 0) { + idbg("Missing POLLIN: revents: %08x\n", fds->revents); ret = -EDEADLK; goto errout; } @@ -1124,6 +1125,7 @@ static int tsc2007_poll(FAR struct file *filep, FAR struct pollfd *fds, if (i >= CONFIG_TSC2007_NPOLLWAITERS) { + idbg("No availabled slot found: %d\n", i); fds->priv = NULL; ret = -EBUSY; goto errout; |