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:
patacongo 2011-12-03 16:13:40 +00:00
parent f1b07efc09
commit bc29aea397
4 changed files with 29 additions and 6 deletions

View File

@ -2230,4 +2230,6 @@
* graphics/nxfonts/nxfonts_sans17x22.h and nxfonts_sans20x26.h: Add
some very small sans serif fonts.
* graphics/nxfonts/nxfonts_sans17x23b.h and nxfonts_sans20x27b.h: Add
corresponding sans serif bold fonts.
corresponding sans serif bold fonts.
* drivers/input/ads7843e.c and tsc2007.c: Fix some errors in the poll
setup error checking that was cloned into both drivers.

23
TODO
View File

@ -1,4 +1,4 @@
NuttX TODO List (Last updated November 15, 2011)
NuttX TODO List (Last updated December 3, 2011)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
This file summarizes known NuttX bugs, limitations, inconsistencies with
@ -16,7 +16,7 @@ nuttx/
(16) Network (net/, drivers/net)
(2) USB (drivers/usbdev, drivers/usbhost)
(7) Libraries (lib/)
(9) File system/Generic drivers (fs/, drivers/)
(11) File system/Generic drivers (fs/, drivers/)
(2) Graphics subystem (graphics/)
(1) Pascal add-on (pcode/)
(1) Documentation (Documentation/)
@ -501,6 +501,25 @@ o File system / Generic drivers (fs/, drivers/)
Status: Open
Priority: Medium
Description: The serial driver (drivers/serial) should return with an
error and errno=EINTR when an interrupt is received. However,
the serial driver just continues waiting:
static void uart_takesem(FAR sem_t *sem)
{
while (sem_wait(sem) != 0)
{
ASSERT(*get_errno_ptr() == EINTR);
}
}
Status: Open
Priority Medium
Description: All drivers that support the poll method should also report
POLLHUP event when the driver is closedd.
Status: Open
Priority: Medium-Low
o Graphics subystem (graphics/)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

View File

@ -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;

View File

@ -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;