mirror of
https://github.com/apache/nuttx.git
synced 2026-06-05 07:12:54 +08:00
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
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user